2 changed files with 11 additions and 0 deletions
@ -0,0 +1,10 @@
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash |
||||
|
||||
# (c) https://stackoverflow.com/questions/10686183/pipe-vim-buffer-to-stdout/10686830#10686830 |
||||
|
||||
TMPFILE=$(mktemp /tmp/viper.XXXXXXXX) |
||||
cat > "$TMPFILE" |
||||
$EDITOR "$@" "$TMPFILE" < /dev/tty > /dev/tty |
||||
cat "$TMPFILE" |
||||
\rm -f "$TMPFILE" |
||||
|
Loading…
Reference in new issue