Ubuntu Vim Installation Javacomplete

Source: Internet
Author: User
Tags autoload

has been very tangled Linux under no similar jcreateor lightweight javaide,vim with Javacomplete although there are a lot of imperfections, but to some extent, to solve the problem of the completion of Java code. Installation process:
    • Download Javacomplete:omni completion for JAVA
      Website download site
      Inside is two folders, one autoload a doc

    • Copy the contents of the two folders to the corresponding folder in ~/.vim/* .
      There is a Reflecttion.java file in AutoLoad, compile it with Javac.

    • Adding ~/.vim/autoload to the Java environment variable, I added it directly to the ~/.BASHRC , and can also be added to /etc/profile

# sun java8u45export JAVA_HOME=/usr/lib/jvm/java-8u45-sun   export JRE_HOME=${JAVA_HOME}/jre   export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:~/.vim/autoloadexport PATH=${JAVA_HOME}/bin:$PATH

Need to update BASHRC after adding

source ~/.bashrc
    • Modify VIMRC
      Add the following sentence:
setlocal omnifunc=  javacomplete #Complete  autocmd FileType java  Set  omnifunc=  javacomplete #Complete  Autocmd FileType java set  completefunc=  Javacomplete #CompleteParamsInf  Autocmd FileType java inoremap <  buffer>    <  C-x  ><  c- O  ><  c-p  >   

Now it should be possible to complement the system's functions:

For more information:
Http://www.cnblogs.com/Nstd/archive/2012/04/14/2447828.html

http://blog.csdn.net/wangran51/article/details/7248945

http://blog.csdn.net/jixiuffff/article/details/5695806

Ubuntu Vim Installation Javacomplete

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.