trapped in vim debug window after git commit w/o message

时间:2019-04-08 13:18:58

标签: git macos vim terminal vi

I am learning to use git and I am familiar with vi which I am using from the terminal of my MacOS.

I don't know if the problem is related to the terminal or to the editor config of git, however when I commit without including a message with '-m "message" '

git commit

git opens a default message through vi or vim on my terminal but it does it splitting the window and including some type of debug window as shown in the screenshots below:

you notice the bar below with the permanent 'Eval:' from here on I am trapped forever...

I tried everything:

:quit, :x, :qw!, :exit, ...

not even

ctrl + c

seems to work... is it my terminal under MacOS ? Is it git which opens vim with debug mode if the message is not added to the commit ? In this case, is there a way to config git in order to use vim without the debug window open ?

I know that you can select your editor via

git config --global core.editor "vim"

but my problem is this debugging sub-window, not vim itself.

I will avoid to commit w/o message attached and it will solve the problem but I would like to know how we escape from this vim window (in case I will have to face the problem and not having any other choice).

Many thanks in advance !

1 个答案:

答案 0 :(得分:2)

This does seem to be emacs not Vim, based on the window's title. You can quit emacs with [Ctrl-x][Ctrl-c].