How to bind keys with higher precedence than evil-keybindings?

The guide for binkding keys doesn’t explain how to override evil states: How to (re)bind keys

In result this in config.el: (map! :map 'override "C-<iso-lefttab>" #'centaur-tabs-forward)

doesn’t work - gets overwriten by (aya-create &optional BEG END)

How does one bind keys to just have them work each and every time?

I think the answer was in FAQ: doomemacs/ at 35865ef5e89442e3809b8095199977053dd4210f · doomemacs/doomemacs · GitHub

It seems to suggest that you need to unbind whatever took that keybinding first…

Just to be sure, there is no way to globally override a keybinding (regardless what other package may later do)? I thought that SPC and M-x are somehow globally bound in the general-override-mode-map? Or can those be “hijacked”, as well?

I think I finally figured it out. This section of the guide about “evil states” explains that there “exist” (but doesn’t give an example how to override them) evil states with higher precedence that general-override-mode-map.

I recalled from the previous episode of this hell (sorry pun on doom the game, but I’m really exhausted right now) that you can add :i (insert) :v (visual) and other properties shown below* to map! macro, which might correspond to overwriting these “states”… and that seems to work.

(map! :nvi "C-<tab>" #'centaur-tabs-forward)

If we could please add an example to 1.4 in the guide that would confirm that, I think it might be helpful for future users as well.

*other properties image

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.