A modern rework of vipe, turning $EDITOR into a pipe friendly tool.
Allows for piping in and out of $EDITOR even if it doesn't normally support pipes.
printf "change me\n" > "my_input.txt"
head -n 1 "my_input.txt" | cut -f 1 | nvipe > "my_output.txt"
cat "my_output.txt"
This text could be changed to anything you wanted it to be in your editor.Clone the repository and run sudo make install to install NeoVipe, its completions, and its man page for all users.
Alternatively put nvipe anywhere on your $PATH, make it executable, and you're all set.
You can manually install tab completions for Bash and Zsh by sourcing the included nvipe-completions file in your corresponding shell rc file.
In it's latest incarnation NeoVipe offers the following on top of its base functionality:
- Respect
$VISUALand fallback toviif neither$VISUALnor$EDITORis specified. - Secure temporary file creation using
mktemp(or at least more secure, see here for caveats).$TMPDIRis respected if it has been set in the environment.- Specify a template filename with
-tor--template, defaults tonvipe.XXXXXXXXXXXXXXXXif unspecified.
- Piping to stdout only continues if the file is saved in
$EDITOR, otherwise an error is raised.- This behavior can be overriden by invoking NeoVipe with the
-por--pipe-without-saveflags, though changes made in$EDITORdo not persist unless the file is saved.
- This behavior can be overriden by invoking NeoVipe with the
- Allows emitting filenames via the
-xor--output-file-nameflags for use with xargs and other similar tools.- Specify a delimiter to append to the filename via the
-dor--delimiterflag. Defaults to\nif unspecified.
- Specify a delimiter to append to the filename via the
- Tab completion of arguments for Bash and Zsh.
If you installed with sudo make install, you can remove NeoVipe, its manual page, and completions with sudo make uninstall.
Alternatively, just delete NeoVipe, its manual page, and completion files if you installed it manually.
NeoVipe is adapted and updated from the following sources:
- The work of Julian Gruber at https://github.com/juliangruber/vipe under the terms of the MIT License.
- The work of Joey Hess at https://github.com/madx/moreutils/blob/master/vipe under the terms of the GNU General Public License version 2.0.
NeoVipe is licensed under the terms of the GNU General Public License version 2.0.
