3 ms·
> I still haven't found a way to make my custom keybindings just work everywhere; every so often I happen to end up with focus in a window where, for example, m
by useragent86 7y ago
> I still haven't found a way to make my custom keybindings just work everywhere; every so often I happen to end up with focus in a window where, for example, my normal window navigation bindings don't work and I'd have to go out of my way to fix it.
The easiest way to do this is to use `bind-keys' (specifically, the one with an asterisk after it, which HN markup won't seem to let me use without creating italics instead), which creates a global map for your personal key bindings that override other bindings (so, use it thoughtfully, and remember that `describe-personal-keybindings' will list them). It's best used in the `use-package' macro, like:
(use-package ace-jump-mode
:bind* ("C-." . ace-jump-mode))
- clarry 7y agoMy bindings need to be state-aware, because they are evil. So a simple global override is actually not quite enough..
- useragent86 7y agoIn that case, I recommend using `general`, which is designed to make configuring EVIL keymaps very easy. It also provides a `use-package` keyword. I use it for all of my keybindings even though I don't use EVIL. https://github.com/noctuid/general.el https://github.com/noctuid/general.el