Closed seschwar closed 8 years ago
Good idea. Added in 28ebfa3bb9e6f3cbea7e9d98cced91b2e0f76722
I also made it act as "q" in magit mode buffers (in normal state) for consistency. If you think that's wrong or think it needs to be other places, let me know.
Now bound [escape] makes all meta keybindings undefined (for example, M-1, M-x, M-p, M-w) inside magit status and magit popup.
@justbur thanks a lot!
I'd like to prevent this from happening as per my question on SO: https://emacs.stackexchange.com/questions/45976/prevent-any-form-of-esc-from-closing-a-magit-buffer How can I do so?
After loading evil-magit, try
(evil-define-key* evil-magit-state magit-mode-map [escape] nil)
Above comment should be added to the README. I almost added a new bug for this.
@ambihelical done
Not exactly this issue's topic but similar: I've been upset when <escape>
doesn't close the magit transient menu (triggered by ?
) like C-g
does. Just found magit uses transient.el
and the problem is transient.el
doesn't bind <escape>
by default (it binds ESC
but in my GUI Emacs the key is spelled <escape>
):
(general-define-key
:keymaps 'transient-base-map
"<escape>" 'transient-quit-one)
(I like general.el
but sure you can also use define-key
here)
Hitting
ESC
to close or get out of everything is a Vim habit I find hard to get rid of. CurrentlyESC
does not close the Magit popup, but acts as a prefix key instead. It would be nice if simply hittingESC
closed the popup window.