git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* using gvim as editor on Windows
@ 2010-03-06  7:06 Tait
  2010-03-06  7:22 ` Jacob Helwig
  0 siblings, 1 reply; 10+ messages in thread
From: Tait @ 2010-03-06  7:06 UTC (permalink / raw)
  To: git


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-03-11  9:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-06  7:06 using gvim as editor on Windows Tait
2010-03-06  7:22 ` Jacob Helwig
2010-03-06  7:37   ` Tait
2010-03-06 12:17     ` Markus Heidelberg
2010-03-08 18:54       ` Tait
2010-03-08 23:32         ` Markus Heidelberg
2010-03-09  2:45           ` Tait
2010-03-09 20:07             ` Junio C Hamano
2010-03-11  9:04               ` Tait
2010-03-11  9:36                 ` Johannes Sixt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).