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