Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

As of now I am using the Vim built-in SyntaxComplete for my editing. I started m

ID: 661934 • Letter: A

Question

As of now I am using the Vim built-in SyntaxComplete for my editing.

I started my JavaEE project in Vim with Ant and went this way for a few weeks but Eclipse functionalities were lacking too much so I gave up for the Java part but I still use it for the other languages that my project requires.

I am not looking for a plugin that provides snippets but I would like to see my functions and variables smartly predicted.

I tried JavaComplete but it was not working. I don't really like the idea of starting the whole Eclipse engine behind Vim as Eclim does but if it's really worth it I could give it a try.

For the other languages, these settings in my vimrc are almost enough but for Javascript:

set nu
set autoindent
set nocompatible
set vb
syntax on
set omnifunc=syntaxcomplete#Complete
filetype plugin indent on

Here is my complete vimrc if you have any suggestions.

Explanation / Answer

I've given up using vim for Java Web development some years ago, cause it really needs a lot of tooling support (Intellij IDEA is very nice). I've had more success using vim for developing Grails applications, but I feel that for Java I really want strong refactoring tools.

Having said that, if you really insist in using vim, here are some plugins that may help you:

syntastic - code hinting support for Java, JS, XML and more
html5.vim - improved HTML5 support
vim-javascript - improved JavaScript support
emmet-vim - aka Zen Coding, speeds up HTML creation
surround.vim - handy plugin to manipulate several types of surrounding marks (e.g.: quotes, brackets, parenthesis, HTML tags, etc)

Note that these plugins are probably helpful in any Web development scenario though, none of them are really specific for Java environments.