[zsh] Move vi init to init_env_vi; set EDITOR in that function
This commit is contained in:
parent
d2713240b1
commit
0883447a44
1 changed files with 2 additions and 2 deletions
|
@ -3,10 +3,10 @@
|
||||||
|
|
||||||
# Prefer nvim and vim, in that order, over standard vi, which is insufferable.
|
# Prefer nvim and vim, in that order, over standard vi, which is insufferable.
|
||||||
|
|
||||||
if whence -cp nvim &> -; then
|
if whence -cp nvim >& -; then
|
||||||
alias vi=nvim
|
alias vi=nvim
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
elif whence -cp vim &> -; then
|
elif whence -cp vim >& -; then
|
||||||
alias vi=vim
|
alias vi=vim
|
||||||
export EDITOR=vim
|
export EDITOR=vim
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue