Eclipse vs Emacs: who wins?
When I started doing Java development, I thought I was going to use Emacs less and less and Eclipse more and more. But I was wrong — I find myself copying text out of Eclipse all the time to put into Emacs. In Emacs, I write a keyboard macro to wrangle the text into submission, run that macro on every line, and then paste it back into Eclipse. Messy? Yep. Quicker than doing it manually? Yep.
However, although I love Emacs, it doesn’t handle all the little nits that you need for J2EE development like Eclipse does. And auto-completion and running unit tests inside Eclipse is just gravy on top of that.
Of course, I use Eclipse’s Emacs key bindings, which makes things easier. But just because it has the same keystrokes doesn’t make it a replacement. I can’t do keyboard macros inside Eclipse, nor can I write some Lisp function (or another language) quickly to get some other dirty work done.
Just yesterday I ran into a seemingly simple problem that uncovered a whole nest of issues.[1] I was switching from JSP to Action class to another JSP , trying to get a handle on the problem. Eclipse was bogging down. It was slow, and then it was telling me that I had problems in my JSP that I didn’t have (this was probably Aptana’s fault). I finally got tired of it, shut down Eclipse, and aimed Emacs at the files. In a short time (and a short time before I had to head home) I discovered the issue, and thought how to best fix it in the evening.
If I left the story here, Emacs would be the winner. But there is more . . .
This morning, I fired up Emacs right away and started working. I thought I had a fix, so I tried to a build. It failed building the JSP’s and gave me the line numbers with the errors. Try as I might, I couldn’t figure out what was wrong. So I fired up Eclipse and opened the JSP. Right away, it said what the problem was All Hail Aptana!). I fixed it and the build went.
So, really, which is the better tool? Neither one. And both. Because without the both of them, I wouldn’t have been able to solve it. I used them together to approach the problem and correct it.
Another interesting thing to note — Eclipse is not really an IDE and Emacs is not really an editor. They are both frameworks — Eclipse is a framework around Java and SWT while Emacs is a framework around Lisp. I just happen to use the IDE and the editor written in those frameworks.
[1] Actually it was a small problem that someone dealt with badly, and that caused a delicate balance in the code. I broke that balance.
