dotfiles/zsh/func/vi

15 lines
293 B
Bash

#!/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 "$@"