Vim Smart Tip Plugin Javacomplete Installation

Source: Internet
Author: User
Tags autoload

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.