I have binded Winum functions to SPC 0 - SPC 9. In which-key minibuffer I see each key by its own (10 labels), which occupies a lot of space. It would be great if I could group all winum keys labels into one label like "0..9". So I wonder there if is some way to do this.

1 Answer 1


Yes, there is a way to do this using the variable which-key-replacement-alist. This should do what you want. You can manipulate it as needed.

(push '(("\\(.*\\) 0" . "winum-select-window-0") . ("\\1 0..9" . "window 0..9"))
(push '((nil . "winum-select-window-[1-9]") . t) which-key-replacement-alist)

The first line tells which-key to replace the binding to winum-select-window-0 with a description of the range. The final line tells which-key to ignore the bindings to winum-select-window-[1-9].

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.