-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about which-key-undo
#354
Comments
Hm, I'm not familiar with how which-key works in neovim. In this package, which-key was designed to be passive and not intercept all key presses, which is why a certain key like Another possibility, and maybe better, would be to define a list of prefixes and bind (setq my-prefixes '("C-x"))
(mapcar
(lambda (x)
(define-key override-global-map (kbd (concat x " DEL")) #'which-key-undo))
my-prefixes) |
TL;DR: How to bind
which-key-undo
toDEL
after every prefix?I'm an emacs noob comming from Neovim recently. Neovim also has a which-key plugin which by default uses
DEL
to undo keystrokes. I want to bring that feature to my emacs config.From the readme we know that there's a
which-key-undo
command that can achieve this. Also, we can pressC-h u
in the which-key-mode-map to undo keystrokes. However,C-h u
is not as fast as a simpleDEL
. Sometimes you just typed some wrong keystrokes and want to clear them quickly. Pressing other keys such asESC
that eventually leads toxxx is undefined
is also an option, but that make me feel 'dangerous'.So generally I'd like to bind
which-key-undo
toDEL
. But that raises another question: I need to bindDEL
after every prefix in emacs for it to work. It can be done manually, but that's troublesome. I wonder if there is a better practice to achieve this?Your advice is highly appreciated!
The text was updated successfully, but these errors were encountered: