Navigation Hydras

John Kitchin has a couple of nice posts on building hydras to ease navigation. In the first, he considers commands that might be classified as “gotos.” They are in the isearch mold. About half of these are from the Avy package. The others make use of helm functionality. In a sense, none of this is new but adding them to a hydra means that you need remember only one key sequence to bring up the hydra menu. If you use a key chord such as 【Super+g】 as Kitchin recommends, then all these commands are only two keystrokes away. That’s pretty handy. Of course, you can still use whatever keystrokes you have assigned to them already, if you prefer, and use the hydra for the less used ones that you can’t remember the key sequence for.

The second post is mostly about “small” cursor movements: move by character, word, lines, paragraphs, etc. This hydra uses standard Emacs cursor movement commands and thus doesn’t require any add ons. The advantage of the hydra is that it makes these commands reachable in a couple of key strokes. Most experienced Emacsers will already have them burned into their muscle memory.

There’s a metapoint to be made here. Steve Yegge changed my life and the lives of countless others by recommending the use of isearch as a navigation tool. The introduction of ace-jump-mode (later replaced by avy) was a refinement of that technique: ways to get your cursor where you want it quickly and easily. They’re all about optimizing your navigation through the text you’re working on. All of the commands that Kitchin captures in his hydras serve this same purpose. It’s definitely worth taking a look at these two posts and using whatever parts you find useful for your workflow.

This entry was posted in General and tagged . Bookmark the permalink.