Why I’m learning Emacs

Emacs is a classic piece of software that has stood the test of time. It has been around for decades and will probably be around for decades to come, so though it has a bit of a learning curve, it’s well worth the effort to learn.

Although my original motivation for learning Emacs was in pursuit of the ultimate clojure IDE experience, I’ve quickly realized it is extremely valuable as a general-purpose editor. My background has always been as an IDE guy (eclipse, IntelliJ IDEA, etc.), aside from knowing just enough vi to get around on the command-line.

Here’s some of the reasons I chose to invest in learning Emacs whole hog:

An IDE-like editor for other programming languages

I’ve started to branch out into some newer programming languages in recent years, and I expect to continue doing so. I need a powerful editor for other programming languages without full-blown IDE support, which I generally will still prefer when available. For example, I would never consider using Emacs for java, where you clearly want first-class IDE support. I would use IntelliJ IDEA hands down.

In terms of a clojure IDE, while I like Cursive, I find I just can’t get a good dev flow going in it. My hope is that Emacs can provide me that powerful and truly “dailed in” experience when writing clojure programs.

You can do ALMOST anything without ever needing to leave Emacs

Google something. Work with version control. Open a shell. Open scratch notes. It’s all right there. And even if you have a more exotic use case, there’s a good chance someone has created an Emacs mode for it!

It’s OSS and free

Enough said.

It’s almost 100% programmable

If I ever want to customize or add some specific behaviour, I CAN. This is usually almost impossible in other editors, or involves writing elaborate plugins. In Emacs, you can frequently write just a single function and then trivially bind it to a key combination or your choice if you want, or just access it by name using the extended command system.

I can create my custom configuration and pull it down to a vanilla Emacs installation on a new laptop and be up in minutes with everything at my fingertips. Granted, IDE’s let you save settings too, but I find when moving machines there’s always some things that don’t carry over.

You can use it on the command-line

This means you have it available to you when in a terminal. This is huge. You can only really do this with a text-based editor like Emacs or vim. In addition, Emacs has a super powerful remote editing capability with TRAMP mode, so you can edit remote files using your local Emacs installation with all your customizations intact.

Economy of Motion

You can do anything in Emacs with just the keyboard. This can really give you flow while working – or so I hear. Being new to it, I’m still incredibly slow. But in time, as the muscle memory develops, I can see it becoming much more efficient than using the mouse where I do now.

Emacs is getting easier to use all the time

With newer versions of Emacs, usability continues to improve. For example, there is now a decent package management story. Many modules keep ease of use in mind and try to minimize required configuration. There’s lots of great starter kits, and reference configurations from prominent users in the community. Overall, Emacs is requiring less need for fiddling unless you want to (which, OK, you will :P).

The Emacs community is VERY active!

Just a cursory browse of some popular packages shows tonnes of recent activity. The editor seems to be enjoying a massive renaissance in the last few years in the age of github; it continues to get better and better, and may be one of the first places to get editor support for a new or emerging programming language or really anything (file formats, templates, etc).

My newbie setup

So far I’m sticking with the GNU 24 distro with the excellent prelude starter kit. This gives me a pretty nice out-of-the-box setup without much need for customization. Of course I did fork it and have started to make a few of my own customizations.

Resources

Besides the built-in help and main Emacs wiki, here are a few other useful resources:

  • Mastering emacs is a pretty good book on the basics of learning and understanding Emacs. There are also a lot of good articles on the books site too.
  • Steve Yegge’s effective emacs – advice from Steve Yegge on how to optimize your emacs experience
  • Emacs stackexchange and Stackoverflow.
  • Awesome emacs – A community driven list of popular packages & libraries.
  • Summary

    In the future, I’ll be writing a blog series on learning Emacs as an IDE coming from a background using IntelliJ IDEA. Amongst commercial IDE’s, IMO IDEA is the best out there. It packs a ton of awesome features and really tries to give you as much as you need so that you almost never have to leave the IDE. Emacs is like this too, but to an insanely higher degree.

    In the meantime, I put together a small site to catalog the key combinations I find essential here.

    2 thoughts on “Why I’m learning Emacs”

    1. emacs rocks :-). I highly recommend http://spacemacs.org. It is very opinionated on how emacs should be used, so it is a slightly higher learning curve but I (and many others) find it very sane. For example, its consistent approach to keybindings and making those imminently discoverable is awesome.

      Prelude is great, but I found I was constantly adding new functionality and trying to keep all the key chords sane was just impossible. Spacemacs solves that beautifully.

      Oh, and why not ALSO learn vim keybindings why you are at it – I promise, you won’t regret it. Well actually you will, you will probably hate it for the first week or so but it quickly becomes very very efficient.

      1. Hi Colin,

        I keep hearing really good things about spacemacs. I’ll have to give it a try soon. One thing I just haven’t found a good solution for yet is forward/backward navigation and I know evil-mode solves that problem (like vim does).

        Thanks!

    Leave a Reply

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