using gvim as editor on Windows
- From
- Tait <git.git@t41t.com>
- Date
- Mar 6, 2010, 07:06 UTC
- Message-ID
- <20100306070628.GM2480@ece.pdx.edu>
I'd prefer to use gvim as an editor on Windows XP instead of vim. (I also prefer it as a difftool, but that's a separate issue.) Gvim releases the terminal when it launches, which git doesn't like too much. So I create gvimf.cmd in my path and use it for core.editor. Gvimf.cmd is quite simple; it calls: start "dummy" /b /wait "C:\Program Files\Vim\vim72\gvim.exe" %*
In .gitconfig: [core] editor = gvimf.cmd
This works well enough for git commit. However, git rebase -i is not happy. It errors: C:\path to\repo> git rebase -i HEAD~10 The system cannot find the file dummy. Could not execute editor
Okay, I can fix that. I change core.editor to "cmd \\/c gvimf.cmd". (This is the same pattern I use for gvim as a difftool.) Now my .gitconfig has: [core] editor = cmd \\\\/c gvimf.cmd
Git rebase is happy, but git commit is not. It errors: C:\path to\repo> git commit 'OMMIT_EDITMSG' is not recognized as an internal or external command, operable program or batch file. error: There was a problem with the editor 'cmd \\/c gvimf.cmd'. Please supply the message using either -m or -F option.
In the selfish hope to avoid work, has anyone else already encountered and solved how to use gvim as an editor?
Tait