if [ ! -f /usr/bin/vi ]; then if [ -f /usr/bin/vim ]; then alias vi vim elif [ -f /usr/bin/nvi ]; then alias vi nvi fi fi