Martin Fowler On Completion And Ivy

If you’ve been around Irreal for a while, you know that I’m a hug fan of abo-abo’s Swiper/Ivy/Counsel package. Its minibuffer completion system means that if I can get anywhere near the name of a command I’m trying to run or a file I’m trying to open, Ivy will find it, usually with just a couple of keystrokes. Even for complicated names, its builtin easy regular expression engine can easily filter a huge list of candidates to just a few close matches.

It turns out that I’m not the only fan. Martin Fowler is a well known software engineer and author who is also a long time Emacs user. Among his favorite Emacs tools is the same Swiper/Ivy/Counsel package much beloved at Irreal.

He has a post describing his Ivy use and how it makes his work much easier. He does a good job of describing the regular expression engine that will translate a space into .* so that foo bar will match any (sub)string beginning will foo and ending with bar. Two spaces are mapped to a space so it’s really easy to write a regular expression that usually does the job without resorting to the full Kleene notation.

Another nice (optional) feature of Ivy is that it can ignore order so that foo bar will match both foo comes before bar and bar comes after foo. You can turn that on for a single instance or configure Ivy to always use it. Check out the post for the details if you’re interested.

If you want to see how Ivy can meet your completion needs, take a look at Fowler’s post.

Update [2024-02-07 Wed 15:43]: Consult → Counsel

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