If you want to set the editor only for Git, do either (you don’t need both):
core.editorin your Git config:
git config --global core.editor "vim"
- Set the
If you want to set the editor for Git and also other programs, set the standardized
EDITOR environment variables*:
export VISUAL=vim export EDITOR="$VISUAL"
NOTE: Setting both is not necessarily needed, but some programs may not use the more-correct
Some editors require a
--wait flag, or they will open a blank page. For example: