[zsh] Move func/ directory to zsh/functions
This commit is contained in:
parent
91da2fc583
commit
7c08c5131f
53 changed files with 1 additions and 1 deletions
20
zsh/functions/init-env-vi
Normal file
20
zsh/functions/init-env-vi
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/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
|
||||
|
||||
export VISUAL=$EDITOR
|
||||
}
|
||||
|
||||
init-env-vi "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue