Matt Terski
Matt Terski

Reputation: 951

How can I set up gVim as my editor on Git for Windows?

I'd like to use gVim as my editor for Git commit messages. I realize Git has its own version of vim, but it's not quite the same as gVim (along with my _vimrc settings) which I use all day anyhow.

Upvotes: 14

Views: 6187

Answers (1)

Matt Terski
Matt Terski

Reputation: 951

You can use gVim with Git by configuring your core.editor to contain the path where you have gVim installed. You'll also want to run it in the foreground and not load your _viminfo file, which would position your cursor in the place where you finished your previous commit message.

Taking note of the single and double quotes, you might do something like this:

git config --global core.editor "'C:\Program Files (x86)\Vim\vim74\gvim.exe' -f -i NONE"

Upvotes: 28

Related Questions