diff --git a/zsh/func/init_rc_vi b/zsh/func/init_rc_vi new file mode 100644 index 0000000..6153fa9 --- /dev/null +++ b/zsh/func/init_rc_vi @@ -0,0 +1,8 @@ +#!/usr/bin/env zsh +# Eryn Wells + +if whence -cp nvim &>-; then + alias vi=nvim +elif whence -cp vim &>-; then + alias vi=vim +fi diff --git a/zsh/func/vi b/zsh/func/vi deleted file mode 100644 index 8b768a1..0000000 --- a/zsh/func/vi +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env zsh -# Eryn Wells - -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 "$@"