export EDITOR='nvim'

# NeoVim as default editor if installed
if [ -x "$(command -v nvim)" ] ; then
  export EDITOR='nvim'
else
  export EDITOR='vim'
fi

Use NeoVim as default editor if installed
Use NeoVim as default editor if installed

Fall back to Vim otherwise
