Hydra, a new Emacs package to fall in love with

A few weeks ago a really nice post appeared. It explained how to use set-transient-map. Is is nice for all the same reasons that all keymaps are nice, and additionally, their transience. The example of managing text size is perfect. Everyone has that in their Emacs config. When we define a goal like “we want to adjust the text size”, we are virtually “in the zone” of performing that task. We just want to hit a couple of keys to make the font bigger or smaller and this approach makes that really easy. That idea, and post, quickly blossomed into a package and many new cool features.

That “zone thinking” is how most modes and features work, whether the authors and the users are conscious of this or not. Hydra makes you very conscious of this. Watch how quickly examples evolved into re-recreating most of what someone needed of ViM. Cool!

The user-interface feature of displaying available commands (while in that “Hydra”) in the mode-line really piques my interest about using Hydras to provide a very “user friendly” suite of features for new users. Granted, after you use the same features a lot your quit using visual helpers, but for new users, this could be really interesting.

This package has all of the earmarks of a game-changer. That is my gut feeling; it will be a major facilitator for expressing all sorts of creative approaches for creative expression in Emacs (or ALEC in my case).

For the last few months I’ve had a thought visit me more than a few times: “What would it take to implement ViM, in Emacs, without taking one peek at evil-mode”. That question was just in the collective conscious I believe. Very, very delightful to see it get answered in this delightful new package, Hydra.

Thank you Oleh!


3 thoughts on “Hydra, a new Emacs package to fall in love with”

  1. Thanks, Grant,

    At one point, I thought that I was writing something cute, a
    proof-of-concept. But now, as I look at my 300 lines of “keys.el” and
    find some bindings that I don’t even recall binding, I see that Hydra
    with its hints is really the way to go.

    Also, it fills the previously empty niche of a dynamically callable
    keymap.

  2. ABO-ABO:

    Great point. We all have bindings important enough to define and infrequently used enough to forget. Take shrink-window; valuable and relatively infrequently used in my workflow. Perhaps I would define a Hydra for “window size related tasks” and add the binding in there with a note. Great way to remember!

Leave a Reply

Your email address will not be published. Required fields are marked *