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

(add-to-list 'load-path "/path/to/anything/folder")
(require 'anything-match-plugin)
(require 'anything-config)

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 Ben-Haim

Programmer for Clockwork Active Media Systems. Also dabbling musician. Also cycling commuter.
This entry was posted in Emacs, Programming and tagged , , , , . Bookmark the permalink.

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

  1. Pingback: Anything.else | MetaSandwich

  2. mousecradle says:

    who needs nachos indeed?
    Thanks for that I’ll give it a go, falls nicely into my belief that my text editor development support environment should work in the background days and nights just waiting for the moment I press that button to second guess me, if it takes it three days to prepare the buffers and saves me half a second so be it :)

  3. Selah Ben-Haim says:

    Not entirely sure what that means, but thanks for reading!

  4. Pingback: Anything.else | MetaSandwich

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s