Browse Source

viper: bash vipe implementation

master
Maxim Likhachev 6 years ago committed by Maxim Likhachev
parent
commit
b20326d5da
  1. 1
      README.md
  2. 10
      viper

1
README.md

@ -28,6 +28,7 @@ will create the symbolic link for each script in the \<path> directory. @@ -28,6 +28,7 @@ will create the symbolic link for each script in the \<path> directory.
- [fsz](fsz) adjusts console font size.
- [hr](hr) displays horizontal rule with current time.
- [vcat](vcat) displays file content with [syntax highlighting](https://www.gnu.org/software/src-highlite/) (see also [bat](https://github.com/sharkdp/bat)).
- [viper](viper) is a simple alternative to viper from [moreutils](https://joeyh.name/code/moreutils/) package which can be used with custom vim parameters.
## Audio

10
viper

@ -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…
Cancel
Save