A simple wrapper for your editor written in bash. I just found writing nvim took to long if i wanted to just edit a file. Of course u could also just use a bash/zsh macro.
To make v availabe as a system wide command:
- put
v-editor.shinto/usr/bin/v(this file should be namedv) or anywhere else on your path. - and make it executable:
sudo chmod +x v
to keep your EDITOR environment variable with sudo:
- execute
sudo visudoand addDefaults env_keep += EDITOR
If there is a package for your OS you should probably use that:
Or just use a macro? (put this in your shell config: alias v=$EDITOR)
This script starts the program stored in the EDITOR environment variable with all given arguments (by calling $EDITOR $@). If EDITOR is empty, will try to start vi instead.
To open test.txt execute:
v test.txt
There is a man page: v.1