Tuesday, 17 September 2013

Execute an open default editor command inside vim

Execute an open default editor command inside vim

I am trying to make a habit of never leaving my gvim, not even for
executing commands in the terminal. This works fine with :!<command>.
However if this command wants to open default editor (vim) it ironically
does not work from gvim (it works from command line vim). Example:
:!git commit
error: Terminal is dumb, but EDITOR unset
Please supply the message using either -m or -F option.
I can run:
:!git commit -m "message"
But I like the vim window when I am inspecting files and write commit
messages. Is it possible to make the commit window appear in gvim as with
command line vim?

No comments:

Post a Comment