Vim autocompletion for Java

11,895

I'm using this. Easy to install and use. Copy the plugin to your server's ~/.vim/plugin directory.

Share:
11,895
Tuomas Toivonen
Author by

Tuomas Toivonen

Updated on June 04, 2022

Comments

  • Tuomas Toivonen
    Tuomas Toivonen almost 2 years

    What are the available plugins for vim to emulate NetBeans autocompletion? I'm developing in a pure command line environment. For C vim was great, but the lack of automatic import and class property autocompletion in vim is a fatal productivity killer when working with enterprise-level Java applications. In the other hand, IDE with vim plugin isn't an option, as I'm working through SSH without X-server.

  • Tuomas Toivonen
    Tuomas Toivonen about 8 years
    Error detected while processing function javacomplete#Start..javacomplete#server#Start: line 26: Traceback (most recent call last): File "<string>", line 1, in <module> File "/***/.vim/bundle/vim-javacomplete2/autoload/javavibridge.py‌​", line 28, in <module> class JavaviBridge(): File "/**/.vim/bundle/vim-javacomplete2/autoload/javavibridge.py"‌​, line 30, in JavaviBridge pythonVersion = sys.version_info.major AttributeError: 'tuple' object has no attribute 'major' line 29: Traceback (most recent call last): File "<string>", line 1, in <module> NameError: name 'JavaviBridge'
  • sarath
    sarath about 8 years
    Make sure that you have the versions of vim, java and javac required by the plugin. if all are fine try adding the following to your .vimrc "autocmd Filetype java setlocal omnifunc=javacomplete#Complete"
  • Sridhar Sarnobat
    Sridhar Sarnobat almost 3 years
    I also have issues. It's not clear how to install it without a vundle, pathogen etc. I have the right versions.