Emacs eclim

I’ve been doing some java development lately and while Eclipse is nice and IntelliJ IDEA is a very good alternative, both are nowhere near emacs in text manipulation capabilities. On the other hand, emacs is awesome in every way except context sensitive completion and re-factoring across a project, a must for Java.

From the eclipse perspective, there are plugins that simulate emacs keybindings, but I was never truly comfortable using them. Emacs is more than its keybindings. From the emacs perspective, there is the Java Development Environment for Emacs, or JDEE, but it doesn’t seem to be under active development; while it gained some momentum last year, their devel mailing list statistics show that only 11 messages have been send this year.

Then, I found Eclim, and as stated in their homepage: “The primary goal of eclim is to bring Eclipse functionality to the Vim editor. The initial goal was to provide Eclipse’s java functionality in vim, but support for various other languages… have been added and several more are planned.”

Basically, eclim has two parts, a java plugin that hooks into eclipse and exposes some of its functionality, and a VIM plugin. I like this approach. For a lot of people, emacs and vim are almost their natural environment, so making other tools provide extra functionality to them instead of trying to simulate the editor experience is the way to go.

For emacs, you have the Emacs Eclim project, hosted in github, which is the equivalent of the vim plugin. To use it, first install eclim, then download emacs-eclim from github, and finally add to you .emacs:

(add-to-list 'load-path (expand-file-name "/path/to/emacs-eclim/"))
(add-to-list 'load-path (expand-file-name "/path/to/emacs-eclim/vendor"))
(require 'eclim)

(setq eclim-auto-save t) ;; very important
(global-eclim-mode)

And now you are ready to go. The main feature missing in emacs eclim is doc searching, but AFAIK it’s provided by eclim, so it shouldn’t be too hard to implement the emacs part. Emacs eclim is under active development.

As a side note, if you want to do some Android development, I deeply recommend you to use IntelliJ. It has built-in Android support and works great. A month ago I tried to setup Eclipse’s android plugin and it was extremely frustrating. So, try IntelliJ if you want to experiment a different IDE and can withstand its no so pretty interface. (They have a community edition which is OpenSource, check it here).

TwitterGoogle+FacebookRedditEmail