-
Notifications
You must be signed in to change notification settings - Fork 87
How to have limit which-key to subset of keymaps #277
Comments
At the moment I don’t think it’s straight forward to only display a
particular mode’s keys based on a keymap. However, the vast majority of
commands from a mode share a common prefix, like ‘which-key-‘ and filtering
on a prefix is definitely possible using the replacement alist
…On Sat, Dec 19, 2020 at 10:19 PM Chris Zheng ***@***.***> wrote:
I'd like to have which-key only display only the choices for mode when it
is present
for example, I'd like to toggle iedit mode and have which-key display
just the iedit mode keys.
Is there a way to do this?
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#277>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3E7SCF5WJIMJBYHM2USDSVVUNLANCNFSM4VCYJ2JQ>
.
|
is there an example that I can go off. basically, I'd like to have a hook for a given minor-mode (iEdit) that only shows it's own keybindings (ignoring other modes like Paredit mode) or, if there was some way to further customise key bindings are shown (in Ranger/Dired) |
Here's one way to go: (setq which-key-allow-multiple-replacements nil)
(setq which-key-replacement-alist '(((nil . "iedit-") . (nil . nil))
((nil . nil) . t))) In this setup, a command starting with |
@justbur. thanks for that. Your example initially confused me until I started playing with it. I think there's actually an easier solution that's already in the library - Will play around with it once I get more time. |
I'd like to have which-key only display only the choices for mode when it is present
for example, I'd like to toggle
iedit
mode and have which-key display just theiedit
mode keys.Is there a way to do this?
The text was updated successfully, but these errors were encountered: