[zsh] Add vi function

This commit is contained in:
Eryn Wells 2017-10-26 15:06:09 -07:00 committed by Eryn Wells
parent 4057fec09b
commit 12fe493b0f

12
rc
View file

@ -11,7 +11,6 @@ alias h='history'
alias df='df -h'
alias du='du -h'
alias v='vim'
alias vi='vim'
alias e='emacs'
binary_exists ledger && alias l='ledger'
@ -45,6 +44,17 @@ function g
return $?
}
function vi
{
if which nvim 1>/dev/null 2>&1; then
command nvim $@
elif which vim 1>/dev/null 2>&1; then
command vim $@
elif which vi 1>/dev/null 2>&1; then
command vi $@
fi
}
alias gp='g p origin $gitbranch'
alias gpf='g p -f origin $gitbranch'