[英]eclim not doing autocompletion in vim
I installed eclim and started running the eclipse headless server, as I was coding with Vim 当我用Vim编码时,我安装了eclim并开始运行eclipse无头服务器。
Now i went to vim , and typed this, 现在我去vim ,然后输入
:PingEclim
It displays this, 它显示此,
eclim 2.4.1
eclipse 4.4.0
Then i did a validation too, 然后我也做了验证
:EclimValidate
and it give the right output, 它给出正确的输出,
Result: OK, required settings are valid.
But then when i try using its autocompletion feature, by say this 但是当我尝试使用其自动完成功能时,可以这样说
System.<ctl + x><ctl + u>
It does absolutely nothing. 它绝对不做任何事情。 No code completion occurs. 没有代码完成。
I need help, as to why it is not working, 我需要帮助,关于为什么它不起作用,
my classpath file for java project is this, 我的java项目的classpath文件是这个,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
I was just getting used to eclim so the java class code is this 我刚刚习惯了eclim,所以java类代码是这样
package org.test;
public class TestMain
{
public static final void main(String[] args) {
System. // I am just not able to get any autocompletion after that .
}
}
My project tree is this, 我的项目树是这个
.
|-- bin
| `-- org
| `-- test
| `-- TestMain.class
`-- src
`-- java
`-- org
`-- test
|-- TestMain.java
`-- TestMain.java~
Okay, I guess i solved my problem. 好吧,我想我解决了我的问题。 In my case it was an issue which I just could not figure out why it does not work, but i figured out how it should work. 就我而言,这是一个我无法弄清楚为什么它不起作用的问题,但是我知道了它应该如何起作用。
I think it might be coz I have YouCompleteMe installed, but I had to override the default autocompletion stored in eclim by additing the below piece of line in .vimrc
. 我认为可能是因为我安装了YouCompleteMe ,但是我不得不通过在.vimrc
以下代码来覆盖存储在eclim中的默认自动完成功能。
let g:EclimCompletionMethod = 'omnifunc'
Now this works perfectly as eclim registers with omnifunc linked to youcompleteme(YCM) and then all of it happens in realtime. 现在,当eclim注册到与youcompleteme(YCM)链接的omnifunc时 , 它就可以完美地工作,然后所有这些实时发生。
Hope this case helps someone. 希望这种情况能对某人有所帮助。 I could not find a single place where this collision between YCM and eclim was explained, and had to figure it all out myself. 我无法找到一个地方来解释YCM和eclim之间的这种冲突,因此必须自己解决所有问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.