Category Archives: git

Use VIM as git editor on Windows

The following configures git to use VIM as the default editor (e.g. for commit messages) on Windows:
git config --system core.editor 'C:\\PROGRA~2\\Vim\\vim73\\gvim.exe' --wait


  • Uses short directory names. You can find these using e.g.:

    dir /X "C:\Program Files (x86)*"

    Notice the star at the end of the command line. This will reveal the short name PROGRA~2
  • Use double backslashes
  • Use single quotes
  • Use the --wait option after closing the single quotes for the path to the VIM editor