emacs-which-key
emacs-which-key copied to clipboard
Trasient maps support
Hi:
I am wondering whether is it something available to provide some support for transient-maps. I mean; is it possible to show some hints with which-key when a transient-map is active?
Isn't the point of transient maps to show you the available key bindings? Are you talking about this package?
Are you talking about this package?
No, I was referring to the set-transient-map
function: https://www.gnu.org/software/emacs/manual/html_node/elisp/Controlling-Active-Maps.html
The only package that offers more or less a similar functionality is hydra... but it is a little bit too much for basic uses and to go into vanilla as which-keys
is expected to do hopefully very soon.
Just chiming in here. I've set myself up with a command to activate a sparse keymap via (set-transient-keymap)
and which-key does not activate. Just wanna throw my name in the bucket of people who might care about this.
(defvar er/keymap
(let ((map (make-sparse-keymap "er/objects")))
(td/bind-keys '(("w" . er/mark-word)
("W" . er/mark-symbol)
("s" . er/mark-sentence)
("p" . er/mark-paragraph)
("b" . er/mark-block)
("e" . er/mark-email)
("u" . er/mark-url)
("o" . er/mark-org-element)
("O" . er/mark-org-parent))
map)
map)
"A keymap for quickly calling expand region functions.
\\{er/keymap}")
(defun er/keymap ()
"Activate the `er/keymap'.
\\{er/keymap}"
(interactive)
(set-transient-map er/keymap))
Hercules was built to use which-key for transient states.
It's like hydra but it doesn't require the significant amount of setup. https://github.com/wurosh/hercules