Command reference: [http://media.cqic.com.cn/vjde-tut/list.htm]
This plugin makes use of some other plugins, such as jcommenter, to provide many useful features.
To make all features work, you must set environment variable JAVA_HOME.
Here is the document which is in Chinese currently.
I summarize some useful commands:
The document says \jc can be used in normal mode. Unfortunately, it does not work.
In file vjde_java_utils.vim, change
nnoremap <buffer> <silent> <Leader>jc :call VjdeGenerateConstructor()<CR>
nnoremap <buffer> <silent> <Leader>jc :call JCommentWriter()<CR>
Then \jc can be used to insert comment automatically.
Select imported packages in visual mode and use command \js to sort those packages based on their names.
Remove unreferenced packages
In a class declaration, use command \ri
Auto add packages
Move cursor to class name, and use command \ai.
Move cursor the full qualified class name (e.g. java.util.Vector), then use \je to put an import statement in the beginning of the file. The package name is removed from the class name.
import java.util.Vector; ... Vector
Select statements you would like to enclose with try-catch, and use command \jt.
Move cursor to the variable for which setter and getter functions are to be generated, then use command \jg
Code completion can used use to auto-complete type name, function parameter, imported package…
Command: Ctrl+x Ctrl+U
Then you use Ctrl+p or Ctrl+n to select a specific item in the list. Or you can select the blank item and use keyboard input to filter the items.
Ctrl+y: accept current selection
Ctrl+e: cancel current selection
use \oe to list all functions declared in super classes (both direct and indirect) of current class. Then input the number corresponding to the function you want to override.
move cursor the string constant, select the whole string in visual mode by using command va", then use \en. You would be prompted to input a name for the variable.
Extract local variable and put it into the parent scope: \el
Make a local variable become a member variable of a class: \em
Make a variable become a parameter: \ep