Git commit -a opens GNU nano 2.2.6 How should I change it to open Vim instead?
To make Vim the default editor for Git only, see HST's answer. However, you probably want to have Vim as the default for all applications.
That can be done by
export EDITOR=vim
in your ~/.bash_profile
or ~/.bashrc
. The key is the export
, otherwise the setting won't inherit to launched processes, like Git is.
You can set it from the command line or in your .gitconfig
git config --global core.editor vim