The Joys of Hippie Expand

Over at the Emacs Elements Channel there’s an excellent video on Hippie Expand, The main problem with Hippie Expand is its name. It gives you no clue as to what it does or why you might want to use it. The TL;DR is that Hippie Expand will try a sequence of completion methods until you find the correct one. It is, in that way, better than any individual completion method.

Being Emacs, it is, of course, configurable. You can specify what completion methods to try and in what order to try them. There is, really, no reason to use any other method. Even if you have some method that Hippie Expand doesn’t use, you can simply add it to the list of methods that Hippie Expand uses. I long ago tweaked the order of the methods but I no longer remember why.

Hippie Expand can be a little confusing because some of the methods may offer more than one completion. In that case, subsequent invocations will offer those completions before moving on to the next method. That’s exactly the behavior you want, of course.

The video demonstrates how to jump to a particular completion method in the list. You have to know the method’s position in the list to use that so it’s not as useful as you might think. All in all though, Hippie Expand is a very useful method that’s worth knowing about.

The video is 12 minutes, 51 seconds so plan accordingly. It’s a good video and a real help in understanding what Hippie Expand does and why you should be using it. It’s definitely worth your time to watch it.

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