One Text Editor to Rule Them All
Stream of thought about emacs
I love emacs. I loathe it at times. I never could get used to Vim. All my computers now remap caps lock to control. Org mode is amazing. Gar, why is it written in lisp. Can I write something in python. I wish it was as small as vim.
Preface up front, I am no emacs guru most of my .emacs is stolen from people wiser than myself.
emacs for those not in the know
emacs is one of the holy two text editors. Vim being the other. Both are extremely capable editors, every programmer should know one of them, to be honest I don’t care which. The history of emacs is best documented here. emacs could best be described as an archaic editor that offers unlimited customization if you spend time with emacs. At the heart emacs is a text manipulator, beyond that it can answer email, read newsgroups, play tetris and act as a shell plus a thousand other options. If you have read my other posts you will know I love small tools that do one thing exceedingly well, that are simple and to the point. emacs is the exact opposite of this, I will try to explain why I love emacs.
Why do I think every programmer needs to know emacs (vim)?
A programmers tool for putting ideas into action is the lowly text editor. Everything we do centers around entering text and having a computer process that and help someone do something. But what of IDEs? asks the peanut gallery. I love IDEs, software would be difficult without top notch IDEs like Eclipse and VS, but every programmer needs to have a secret weapon in the closet. Something powerful, something emacs.
- emacs is cross platform, via usb drive/dropbox I can have a live emacs ready to go wherever I go. The commands are all the same and it all looks the same. Everyone needs a stable text editor.
- emacs is stable, emacs has been around a long time, it also has some of the worlds best developers working on it. The core code is solid, this is a program you can leave running for months without blinking an eye, I mean it is practically an OS anyways!
- emacs is customizable, if there is some software more customizable than emacs I don’t know what it is. Granted most people just cut and paste bits from other people but you can change the very foundations of emacs with knowing just a bit of lisp and how emacs functions.
- emacs will go where no files have gone before, need to open enormous files. emacs is up to the task. Need to work with python, xml, c#, java or just good ole txt. emacs can handle that.
- emacs is free of distraction. The actual ui is very simple. Some text buffers and then a command buffer at the bottom.
All that being said I know plenty of good, perhaps great programmers who never touch emacs(vim). emacs is not for everyone, it has plenty of faults, and speaking of faults.
emacs, the archaic
Ever get the feeling that a program is secretly trying to kill you? emacs sometimes likes to do that. For instance emacs should just pop up and say, oh I notice you have not remapped the caps lock key, let me fix that for you before your pinky falls off. If you haven’t remapped that key do so now SharpKeys for windows or Keyboard Options for OSX. Now thats better, now you don’t have to stretch that pinky all the way down there. Feels better doesn’t it? Now go read an article on emacs, download some extensions, include them in your emacs. Put in some random lisp command that you got from Paul Graham. Now boom something awesome happens and you don’t really know why or how, and if you try to look at the lisp your head spins because they went way over the qouta on parantheses.
emacs is archaic and has a lot of history that no longer seems pertinent. That being said it has one mode that is more awesome than awesomo.
Just go read about it here. I will wait. This is one of the best tools available. I use org mode more in emacs than text mode. It is that important to me. My coworkers think it is mystical how I can create an html report detailing what I have done and when I completed it on the fly. Then I show them the deep linking and nesting and all the other awesome things org mode can do. I can see the envy in their eyes, the same way they envy my filco ten keyless keyboard. Yet when I show them emacs they cringe and decide to find other ways.
Are you interested yet?
If you try emacs and hate it then try vim. If you hate both then give emacs a try a few months down the road. Fiddle with it, try to do some simple text editing read the tutorial. I spent months maybe a year in an on and off relationship with emacs. I hated it with a passion but I read how people loved it. Then I got OSX and started doing some development via ssh logging into the OSX box and writing python or objective-c and needed a command line text editor. So I jumped in and have only peeked back once or twice. All the while letting my fingers remember archaic commands.