Vim - 自动完成 Java

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5432884/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 11:06:21  来源:igfitidea点击:

Vim - Auto-complete Java

javavimautocomplete

提问by Luca Matteis

I find myself wanting to auto-complete things that I import in the .java file I'm editing. So for example I'm working on Test.java, and inside I have import java.util.List;. Can I auto-complete (Ctrl+n) the methods inside the List interface so that when I do something like List l = new ArrayList(); l.<Ctrl+n>the methods show up?

我发现自己想要自动完成我在我正在编辑的 .java 文件中导入的内容。例如,我正在研究Test.java,并且在里面我有import java.util.List;. 我可以自动完成 (Ctrl+n) List 界面内的方法,以便在我执行类似List l = new ArrayList(); l.<Ctrl+n>方法的操作时显示这些方法吗?

采纳答案by Konrad Rudolph

It may be possible to use Eclimto achieve this. I have no idea how usable this is, though.

可以使用Eclim来实现这一点。不过,我不知道这有多大用处。

http://sourceforge.net/dbimage.php?id=70822

http://sourceforge.net/dbimage.php?id=70822

回答by frank

The javacompleteomnicompletion script seems to provide an extensive feature list. I don't know if it works with what you're asking but it does not need eclim.

javacompleteomn​​icompletion脚本似乎提供了一个广泛的功能列表。我不知道它是否适用于您的要求,但它不需要 eclim。

There's also the Vim JDE scriptbut it needs vim built with ruby support.

还有Vim JDE 脚本,但它需要使用 ruby​​ 支持构建的 vim。