You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is a good and detailed guide and configuration of your Emacs.org. But I'm struggling with one of your configurations, namely (global-set-key (kbd "<escape>") 'keyboard-escape-quit). That I don't think it will work, since global-set-key will put the key binding into Emacs's global keymap which resides in a quite low precedence. You activated evil, and all evil's default keymaps reside in emulation mode keymap of Emacs which has higher precedence than global keymap.
Evil devises its own keymaps into hierarchy as well, all evil's state mode keymaps are basically in the evil global keymap, which in turn has relatively low precedence in evil's own keymap hierarchy. The <escape> key is mapped to evil-force-normal-state command in evil-normal-state-map. So evil's definition will intercept yours. You can use command-log-mode to see to which command exactly the key is bind.
You can use evil-define-key command to define your key binding again. This will put it into evil's axauliry keymap, which is higher than the evil global keymap. For me, evil-force-normal-state is not too useful when you are already in evil's normal state.
The text was updated successfully, but these errors were encountered:
Thanks for the feedback! This binding is mainly meant for exiting the minibuffer with ESC but honestly I almost never use it. I became much more used to pressing C-g instead. I'll probably just remove this binding!
Hello David,
It is a good and detailed guide and configuration of your
Emacs.org
. But I'm struggling with one of your configurations, namely(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
. That I don't think it will work, sinceglobal-set-key
will put the key binding into Emacs's global keymap which resides in a quite low precedence. You activated evil, and all evil's default keymaps reside in emulation mode keymap of Emacs which has higher precedence than global keymap.Evil devises its own keymaps into hierarchy as well, all evil's state mode keymaps are basically in the evil global keymap, which in turn has relatively low precedence in evil's own keymap hierarchy. The
<escape>
key is mapped toevil-force-normal-state
command inevil-normal-state-map
. So evil's definition will intercept yours. You can usecommand-log-mode
to see to which command exactly the key is bind.You can use
evil-define-key
command to define your key binding again. This will put it into evil's axauliry keymap, which is higher than the evil global keymap. For me,evil-force-normal-state
is not too useful when you are already in evil's normal state.The text was updated successfully, but these errors were encountered: