Download Javacomplete from the Https://github.com/vim-scripts/javacomplete website
Create a new Javacomplete-master folder and copy the Javacomplete-master.zip to this folder
mkdir javacomplete-master && cp javacomplete-master.zip./javacomplete-master
Unzip
Unzip Javacomplete-master.zip
Configuration
Add the extracted AutoLoad and doc content to the appropriate directory under ~/.vim/, if the ~/.vim does not have these two folders to create manually
Where AutoLoad has javacomplete.vim Java_parser.vim Reflection.java three files, the thing to do is compile: Javac Reflection.java get a. class file
Add the path to the. class file to the CLASSPATH environment variable
Then make the environment variable effective as source. BASHRC (because my environment variable was added in ~/.BASHRC)
Add Configuration in ~/.VIMRC
Setlocal Omnifunc=javacomplete#Completeautocmd Filetype JavaSet Omnifunc=javacomplete#Complete Autocmd Filetype JavaSet Completefunc=javacomplete#CompleteParamsInfinoremap<buffer><c-X><c-U><c-X><c-U><c-P> Inoremap<buffer> <c-s-space> <c- x ><c-u ><c-p >autocmd Filetype java,javascript,jsp inoremap <buffer> . . <c-x ><c-o ><c-P>
Effect:
Vim Smart Tip Plugin Javacomplete Installation