Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

vim

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.

like image 616
Matt Terski Avatar asked Mar 09 '15 21:03

Matt Terski


1 Answers

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"
like image 123
Matt Terski Avatar answered Nov 05 '22 14:11

Matt Terski