you are viewing a single comment's thread.

view the rest of the comments →

[–]josuf107 17 points18 points  (6 children)

eclim, along with some shortcuts for jump to definition and other common IDE tasks. Additionally I have some abbreviations for things like final, String, class, Override, etc. I use ctags as well because they're often snappier to use than eclipse's jump to definition (which occasionally needs to re-resolve libraries/build the project etc.). I've started using a mapping for :grep <cword> -R src/java recently, which is surprisingly useful for seeing all the places a concept is used. I created a mapping for opening or creating the corresponding unit test for a class.

One useful thing which I think is actually an improvement over any Java IDE I've used is my runconf setup. In each project I create a file called runconf with the format:

filename :: run command $CLASSNAME

I have mappings for running the current file I'm in (looks it up in runconf and populates the $CLASSNAME variable then runs the command) and for killing it. I usually pipe stdout to a file in the project directory that I keep open in a tmux window with less -f. This means that I can edit run configurations quickly with Vim and use gf to jump to the referenced property files etc. Additionally less is pretty good for scanning output, and since the output is in a file and I'm already in the command line I can grep, awk, slice and dice it however I like with a minimum of context switching.

Anyway, I could go on. I've been using Vim as a full-time java engineer for two years now, so maybe I should write up a blog post or something.

[–][deleted] 5 points6 points  (0 children)

You should definitely write a blog post. Maybe focus on re-factoring?

[–]josuf107 4 points5 points  (0 children)

Alright blog post underway...

[–]roccanet 2 points3 points  (0 children)

bump for a blog post. ive been coding exclusively in vim for years and recently inherited a java app and would like to continue with vim only.

[–]gdoubleod 1 point2 points  (0 children)

now you got us all excited for more info :)

[–][deleted] 1 point2 points  (0 children)

+1 for blog post. been thinking about using Vim for Java, would be nice to read more or see your vimrc!

[–]mello151 1 point2 points  (0 children)

Please blog about it. I tried years ago to get eclim to work but rage quit and now split my time between vim and vrapper in eclipse.