Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclim not doing autocompletion in vim

I installed eclim and started running the eclipse headless server, as I was coding with Vim

Now i went to vim, and typed this,

: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,

<?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

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~
like image 453
harpribot Avatar asked Jul 30 '15 15:07

harpribot


1 Answers

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.

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.

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.

like image 97
harpribot Avatar answered Sep 28 '22 02:09

harpribot