[zsh] Move vi function to a simple alias in init_rc_vi

This commit is contained in:
Eryn Wells 2022-05-25 17:02:01 -07:00
parent a66be0e49e
commit e8aae4ef89
2 changed files with 8 additions and 15 deletions

8
zsh/func/init_rc_vi Normal file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env zsh
# Eryn Wells <eryn@erynwells.me>
if whence -cp nvim &>-; then
alias vi=nvim
elif whence -cp vim &>-; then
alias vi=vim
fi

View file

@ -1,15 +0,0 @@
#!/usr/bin/env zsh
# Eryn Wells <eryn@erynwells.me>
function vi
{
if whence -cp nvim 1>/dev/null 2>&1; then
command nvim $@
elif whence -cp vim 1>/dev/null 2>&1; then
command vim $@
elif whence -cp vi 1>/dev/null 2>&1; then
command vi $@
fi
}
vi "$@"