Hydra & Hercules by Unknown
Once you summon the Hydra through the prefixed binding (the body + any one head), all heads can be called in succession with only a short extension.
The Hydra is vanquished once Hercules, any binding that isn't the Hydra's head, arrives. Note that Hercules, besides vanquishing the Hydra, will still serve his original purpose, calling his proper command. This makes the Hydra very seamless, it's like a minor mode that disables itself auto-magically.
hydra is simply a package that provides lets us create configurable menus for quick access to commands for GNU/Emacs
2.1. Package Install
Load up the
Here is a simple
hydra function for scaling text.
(defhydra hydra-text-scale (:timeout 4) "scale text" ("j" zamlz/increase-font-size "in") ("k" zamlz/decrease-font-size "out") ("h" zamlz/reset-font-size "reset") ("f" nil "finished" :exit t))
We can add this
hydra function to our General Leader Keybindings Definer for easy access.
(require 'init-general) (zamlz/leader-keys "ts" '(hydra-text-scale/body :which-key "scale text"))
2.3. Feature Provider
Make sure to provide the feature.