I need a hydra with four "heads", each of should exit the hydra when its function is executed.
The hydra intended to be used in dired-mode
and direx:direx-mode
and pop-up when O
pressed. This is what I got so far:
(defhydra dired-open (dired-mode-map "O" :exit t)
"dired-open"
("j" dired-find-file-other-window-below "below")
("k" dired-find-file-other-window-above "above")
("h" dired-find-file-other-windowd-left "left")
("l" dired-find-file-other-window-right "left”))
it kinda works, but:
it's a bit ugly - I would like to learn how to make "proper" hydras, like in magit
it works only
dired
mode, I don't know how to properly bind it for both modes
upd: apparently Spacemacs has builtin function for introducing transient states. I'm gonna add Spacemacs tag, since I'm using it
magit-popup
package.