if command -v vim >/dev/null 2>&1; then alias vi=vim fi if command -v nvim >/dev/null 2>&1; then alias vim=nvim alias vi=nvim fi export EDITOR="nvim" export SUDO_EDITOR="nvim" export DIFFPROG="nvim -d"