Why emacs is still in my toolbelt
2009/07/02 6 Comments
When I first started out as a developer one of the crackpot nutjobs with whom I worked at the time convinced me that emacs was absolutely the best editor to use. I didn’t really know any better and he was by far the fastest and most nimble code navigator of anyone else in the group so I gave it a try. Many hundreds of hours of elisp hacking and a 37MB ~/.emacs.d directory later I am a fairly well worn emacs yeoman. For many years I used nothing but emacs, cramming all sorts of language modes in it to make it do fun stuff and syntax highlight everything from shell script to Java to Ruby to InstallScript (insert vomiting in own mouth joke here).
I say, with no small amount of nostalgia, that emacs is no longer the development workhorse it once was for me. I spend most of my time writing large Java projects and have fallen prey to the siren song of fancy IDE’s with their “Show me a list of all the places this specific method is called anywhere in my project” tricks and “Refactor this entire package hierarchy with all the file renaming and moving and even rename the getters and setters to reflect the new names” chicanery. Emacs had a few tricks to make it look like it was doing these things but it was always kinda hacky and required a great deal of TLC to keep it working across JDK upgrades and switching projects with environment variables and jdk-* elisp variables that were just right.
All that said, you can have my emacs when you pry it from my cold dead hands, and here’s a glimpse into why:
- Zip file handling smooth as a baby’s butt
Have you ever tried to open a zip file with emacs? Give it a try, its awesome. It shows you a normal list of all of the files in the zip archive. No big deal, right? Now move the cursor onto one of the files. Shows you the file, doesn’t it. Not bad, huh? Now try editing the file. Let’s you edit it, doesn’t it. Now try saving it. Oh baby. Right back into the archive where it belongs and you don’t even have temp files to clean up. Seriously? That’s worth the price of admission right there.
- That’s what you’re computer is for, numbskull
If I see one more person with their hands hovering over their keyboards in some weird way just so that they can type “Down arrow, End, BkSpace, BkSpace” over and over for every line in a 500 line file I’m going to scream. I know emacs is not the only editor that does simple macro recording and playback, but if your editor doesn’t have that (yes, I’m staring at your Eclipse) then you most likely have wasted some time this week.
“C-x-( <do your thing here> C-x-) Ctrl-u 500 C-e” and 500 lines later your done. Menial tasks should not be done by people.
- Graphical and terminal mode
This may be specific to you server developers out there, but sometimes you just need a decent editor on a headless server. I know, I know, use vi. If I wanted to ask my editors permission to type a letter I would install Clippy (ducks). Sorry, had to get that in there. Having a workable dev environment on a headless server has been a huge help on many occasions where fun graphical wizbang is just not an option.
- Cross Platform
Linux, OS X, Solaris, even Windows if I really have to, but emacs comes with me everywhere. It always works and so does my well worn ~/.emacs.d directory of everything I’ve ever needed. Its a great way to lower the cognitive load of jumping around all the time. What good is your trust side kick if it doesn’t come with you wherever the fates may carry you?
The list really goes on and on. The idea here is less about emacs specifically and having really amazingly good reliable all purpose text editor to sit next to your honkin’ cool IDE and fill in the gaps. If you are a gainfully employed programmer and you use notepad.exe for anything, then you are a thief stealing from your employer.
I’ll be honest, I spend a lot less time in emacs than I used to, but every good carpenter needs a good hacksaw/screwdriver/nail puller/hedge trimmer/ladder/rotary drill/french coffee press/drop cloth/tire rotater. Right?