简体   繁体   中英

How to show arguments of java function in vim + eclim?

I have configured vim + eclim OK. Now I can use Ctrl+X and Ctrl+U complete functions. But there is no arguments hint. For example,

FileInputStream fins = new FileInputStream(/* what arguments can be used here? eclipse will show those but eclim not */);

how to show arguments hint in vim + eclim?

Resurrecting this old question, since I stumbled on this.

You can use eclim to lookup the java docs of the class and look through the list of constructors that way using the :JavaDocSearch command.

Because the command uses a browser to render the javadocs, you'll need to add to your .vimrc :

let g:EclimBrowser = 'browser-executable-name'

Replacing browser-executable-name with your console-based browser of choice. Example: lynx , links , w3m

Then navigate over FileInputStream with your cursor and run the command :JavaDocSearch and it will pop up the java doc for the class.

Or enter the class name manually: :JavaDocSearch java.io.FileInputStream

You can use the YouCompleteMe (YCM) plugin with options

let g:ycm_add_preview_to_completeopt = 1
let g:ycm_autoclose_preview_window_after_insertion = 1

Note that this does not work for your Constructor invocations. But at least prototypes for method calls will be shown.

Also, if you don't like the auto-popup of YCM, it can be switched off.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM