0

Spacemacs offers many hydra window to show various keys.
(And my question is not specific to spacemacs, just hydra in general) Sometimes there are many commands so it's hard to find what's there.

Is it possible to grep on those key descriptions in hydra window?

I use describe-keymap or describe-bindings but I think being able to explore the hydra window might be helpful

enter image description here

The hydra window (bottom section) shows many commands, is it possible to search (like isearch or similar) those commands rather than trying to find them by eyes?

eugene
  • 481
  • 1
  • 5
  • 11
  • It's not clear what you're asking. Try asking how to do some specific thing, rather than a vague "is it possible..." – Drew Aug 30 '23 at 01:52

1 Answers1

0

Your example image shows a 'which-key' buffer, not a 'hydra'. You can try pressing SPC w . to see an example of a hydra.

I don't know of an easy way to search the which-key buffer, but you can do M-: (setq which-key-persistent-popup t), then navigate to the which key menu you'd like to search and get out by pressing C-g. Now you can select it e.g. by pressing SPC w w. Finally, you can search the buffer like any normal buffer (e.g. using / or SPC s s). You can also close the buffer like any normal buffer (e.g. SPC b d).

Of course to make this easier, you could make a command to toggle the value of which-key-persistent-popup (and optionally bind it to some convenient key sequence).

(defun my-toggle-which-key-persistent ()
  (interactive)
  (setq which-key-persistent-popup (not which-key-persistent-popup)))

An alternative solution, which more or less does exactly what you are asking for, can be found here (I found it only after writing this answer).

dalanicolai
  • 6,108
  • 7
  • 23