I have this strange problem with using vi
as the editor for git commit -a
.
Normal flow is: I type git commit -a
, vi
appears, I enter my commit message, and then :wq
to save & exit from vi
.
This works fine. However, sometimes I make a typo and instead of :wq
I type :Wq
(because I use the shift for :
). Then, when I correct myself and type :wq
again, git
gives the following error:
error: There was a problem with the editor 'vi'.
Please supply the message using either -m or -F option.
How can I fix this?
git
andvi
? I can't repro this with vim 7.3, git version 1.7.11.1.7.3
and git1.7.9.6 (Apple Git-31.1)
, the default ones on Mountain Lion afaikvim
andgit