practicalli / spacemacs

Content for the book - Clojure Development with Spacemacs
https://practical.li/spacemacs
Creative Commons Attribution Share Alike 4.0 International
110 stars 33 forks source link

Renaming an existing key binding #203

Open practicalli-johnny opened 4 years ago

practicalli-johnny commented 4 years ago

This method for removing the current name from the which-key list, seems to work:

  (delete* '("\\`SPC b C-d\\'") which-key-replacement-alist :test #'equal :key #'car)

source: https://www.reddit.com/r/spacemacs/comments/9rnh0p/anyway_to_undo_default_spacemacs_leader_prefixes/e8id41h/

Now the key binding list (https://github.com/justbur/emacs-which-key) that appears when pressing: SPC b shows the name of the current command, (without the commands spacemacs/ prefix, the full command name is: spacemacs/kill-other-buffers):

C-d -> kill-other-buffers

When the key is rebound with:

(spacemacs/set-leader-keys "b C-d" 'spacemacs/kill-matching-buffers-rudely)

Then the key is shown as:

C-d -> kill-matching-buffers-rudely