[zsh] Give all the init-env functions consistent names
This commit is contained in:
parent
e5505a7a69
commit
f2144fcbed
8 changed files with 28 additions and 52 deletions
18
zsh/func/init-env-vi
Normal file
18
zsh/func/init-env-vi
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env zsh
|
||||
# Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
function init-env-vi
|
||||
{
|
||||
# Prefer nvim and vim, in that order, over standard vi, which is insufferable.
|
||||
if whence -cp nvim &> /dev/null; then
|
||||
alias vi=nvim
|
||||
export EDITOR=nvim
|
||||
elif whence -cp vim &> /dev/null; then
|
||||
alias vi=vim
|
||||
export EDITOR=vim
|
||||
else
|
||||
export EDITOR=vi
|
||||
fi
|
||||
}
|
||||
|
||||
init-env-vi "$@"
|
Loading…
Add table
Add a link
Reference in a new issue