Skip to content

Javacomplete is a plugin for vim for java completion.

Notifications You must be signed in to change notification settings

phlip9/javacomplete

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

javacomplete

Java omni-completion for Vim 7.x

Starting point of the projec is:

I do not take credit for any of the work, I have contacted the authors about these modifications.

Modifications

javacomplete.vim is a vim plugin that uses

  • a java parser written in plain vim for completion in source code files.
  • a java reflection class written in java for completion from jars / .class files

I have made the following changes:

  • added javacomplete#GoToDefinition; should open the definition of any varible inside the file, or outside

  • changed the Reflection.java mechanism with a new tool, that ** introspects and saves caches with parsed source / introspection data for both source and binary classes

  • the vim script parser is kept for the current file.

Dependencies

Usage

In ftplugin/java.vim - Add the following to enable javacomplete:

setlocal omnifunc=javacomplete#Complete

GoToDefinition example keybind:

<leader>b :call javacomplete#GoToDefinition()<CR>

Create a vim script file containing the list of classes, jars and source paths in your project:

call javacomplete#AddClassPath('/home/user/.m2/repository/asm/asm/3.1/asm-3.1.jar')
call javacomplete#AddClassPath('/path/to/class/files')
call javacomplete#AddSourcePath('/path/to/source')
...

Source the file, edit something in your project. C-x C-o gets you omni completion, b goes to definition

About

Javacomplete is a plugin for vim for java completion.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 81.3%
  • Java 18.7%