Make Vim Default Editor For Git and OS

serhatteker profile image Serhat Teker Originally published at tech.serhatteker.com on ・1 min read

I prefer to write my git commit messages in Vim instead of nano or emacs or anything. To set this 'globally', change your Git's core.editor:

$ git config --global core.editor "vim"

If you also want to set Vim for other programs as well, set the standardized VISUAL and EDITOR environment variables in your terminal resource file (.zshrc, .bashrc, config.fish etc.)

export VISUAL=vim

All done!


If you wonder why both VISUAL and EDITOR set, please look at : VISUAL vs EDITOR

Posted on by:

serhatteker profile

Serhat Teker


Uomo Universale | Software Engineer | Entrepreneur | builds systems | py:js:go |


markdown guide

vim is an amazing piece of software.