I’m doing my best to follow the directions for install here: http://vim.sourceforge.net/scripts/script.php?script_id=1785, but I can’t get it working and it seems sort of vague.
Here’s what I’ve done.
- I verified that I’ve got vim 7 or higher.
- I created a $HOME/.vim directory
- I unzipped the latest into $HOME/.vim
- I added the following two lines to .vimrc:
:setlocal omnifunc=javacomplete#Complete
:setlocal completefunc=javacomplete#CompleteParamsInfo
From there I’m not sure what I’m supposed to do to get it working. Ideas?
The
:setlocalcommand set only the value for the current buffer and it makes no difference inside.vimrc. Instead, you should tell vim to set the value for every file of typejava. This is how it is done:Replace the commands in your
.vimrcwith the lines above and reload it (you can run:source ~/.vimrcfor that).Notice that you need
autocmdfor that (you must observe the value1when running:echo has("autocmd")inside vim).