What can I get for 10 dolla? Anything.el.

Actually it’s not even $10. It’s free, both as in speech and as in nachos. So in the spirit of fanning both sides of the fire, here’s a quick look at anything.el for (gasp) Emacs.

Anything.el is most certainly one of Emacs’s killer features. It’s like ido-mode on steroids, but without the rage or shrinking testicles.

It’s been described as Quicksilver for Emacs, which I guess is kinda true, but that’s not the way I use it.

The documentation for the anything function says it all:

Select anything. In Lisp program, some optional arguments can be used.

Tomas has a poet’s soul, and what he means when he says “some optional arguments can be used” is that you can go bat-shit crazy with what goes in, what gets displayed, what comes out, what happens then, where am I, why am I naked?

But before we get there, let’s cover the basics, shall we?

Installation

M-x auto-install-batch is one option. auto-install.el is here and it’s super handy. Ask for the “anything” package, and you’ll get anything.el, anything-config.el, and anything-match-plugin.el. You’ll want all three. Of course you can just follow the links and install the files yourself if that’s your thing.

Once you’ve got these boys somewhere handy, just

[lisp gutter=”false”]
(add-to-list ‘load-path "/path/to/anything/folder")
(require ‘anything-match-plugin)
(require ‘anything-config)
[/lisp]

Eval all that, and you’re ready to go.

Usage

M-x anything

Now we’re in the *anything* buffer, and you can have a merry time typing away at any part of the filename or filepath you’re after. Behold as anything.el starts chipping away at the options. C-n and C-p behave as expected. Left and right arrow keys move you to different groups of things.

Because you’ve got the match plugin installed, you get some bonus features. Say you start typing your filename, and you’ve still got 50 matches. Add a space and you’re in a whole new pattern group. So now you start typing something unique in the path, and viola, you’re looking at a full-on double rainbow.

Once you’ve found your victim, hit enter to do the default thing, which is usually the thing you want. If you’ve got eccentric taste, hit tab instead for a list of other things you can do with the thing you’ve selected. Thing.

More Youthage

Things get real crazy when you crack open anything-config.el. Go ahead and anything-imenu up in there and type in “anything”. Here’s a list of custom anything.el commands you get for free. Who needs nachos? You’ll have a riotous time mapping keys to the bazillion-ish anything.el commands the anything-config.el crew have put together for you.

For my part, C-x b is anything-mini, which serves up a combination of buffers and recent files. C-x C-i is anything-imenu, which is awesome wearing a hat. C-x f is anything for recent files, and C-x C-f is ido-find-file, which still trumps anything.el for navigating about file systems.

But wait, there’s more!

You remember that part about going guano building your own who-knows-whats on top of anything.el? It’s anything.el‘s finest suit, but alas, a subject for another post.

About selah

Programmer at Prominence Advisors. Also dabbling musician. Also cycling commuter.
This entry was posted in Emacs, Programming and tagged , , , , . Bookmark the permalink.

21 Responses to What can I get for 10 dolla? Anything.el.

  1. Pingback: Anything.else | MetaSandwich

  2. Pingback: Quora

  3. Pingback: Emacs: what are good tactics for navigating directories and opening files? | PHP Developer Resource

Leave a Reply to Oscar Cancel reply

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