emacs-which-key
emacs-which-key copied to clipboard
possible to rename existing prefix?
Hello and thank you @justbur for providing such a helpful package!
I'm wondering if it's possible to rename an existing prefix that's already been defined (in my case by spacemacs). (The functionality to rename an existing command works perfectly:
(which-key-add-key-based-replacements "SPC :" "abc") ;; changes command name as expected to 'abc'
But if I wanted to rename the SPC a
prefix (currently applications
in spacemacs), this code doesn't seem to do anything for me:
(which-key-add-key-based-replacements "SPC a" "abc")
If this is possible, what's the correct approach?
It depends a bit on how spacemacs is defining the prefix name, but there should be a way to override it. It's possible the prefix naming is being deferred, so they are renaming it after you do.
The simplest way to do it might be to use a method that has higher precedence on which-key's side. If you know the keymap that the key definition is going into you can try
(which-key-add-keymap-based-replacements keymap "SPC a" "abc")
Cool, thanks for the tip @justbur! :)