zv is like z, but for vim (or any other command).
It allows you to quickly open a file as long as it's been opened before with vim1 (since it's based on the viminfo file).
This has been inspired by rupa/v, whose development seems to have stalled.
Differences can be found in the What's changed? section.
zvis POSIX compliant and conformant to the Utility Syntax Guidelines, which means that it can be used without additional software in POSIX systems that don't havebashas their default shell, such as FreeBSD;zvcan open files with any command, not justvim— the command can be specified with the-coption or theZV_CMDenvironment variable;2- the default command is read from the
EDITORenvironment variable and can be overridden with theZV_CMDenvironment variable; ZV_VIMINFOcan be used to customize the path to theviminfofile.- options are different, see the manual page for details.
Put zv somewhere in your PATH (e.g. /usr/local/bin/).
For the manual page, put zv.1 somewhere in your MANPATH (e.g., /usr/local/man/man1/).
Footnotes
-
Or any other command, see What's changed?. ↩
-
Additional arguments may be specified here, e.g.,
ZV_CMD='bat --style=full'. ↩