-   Linux - Software (
-   -   vim code completion problem (

shogun1234 03-07-2008 06:40 PM

vim code completion problem
I follow the instruction at to enable the code completion, but fail. Following is the steps I perform. What do I miss?

1.) unzip to $HOME/.vim folder.
So under the .vim folder there contains 2 sub-folders, including autoload and doc

2.) update .vim doc
After launching the vim editor, typing `:helptags $HOME/.vim/doc`

3.) set Omnifunc.
In the .vimrc adding line 'setlocal omnifunc=javacomplete#Complete'

4.) compiling and put it under .vim/autoload and/ or $HOME/ folder.

5.) launching vim and in the insert mode, press button <Ctrl> + X / <Ctrl> + O , etc. But it does not work.

Where did I do it wrong? Or what steps I miss?

env: Debian lenny, vim v7.1.241, v0.77.1

Thank you very much

JMJ_coder 03-08-2008 07:36 PM


What is <CTRL>+X and <CTRL>+O supposed to do?

If you enter a piece of code that they use as an example:



import java.util.;

public class Test extends {
    private String name;
    private String title;
    void title() {

with the cursor immediately after the last s in String.class, does a menu come up like it does in this example picture?

The instructions say that will be automatically compiled and placed in your $HOME directory, so you shouldn't have to do anything with that.

Also, did you leave off the single quotes in the .vimrc?
The entry should be

setlocal omnifunc=javacomplete#Complete
And I might try if that doesn't work to put:


set omnifunc=javacomplete#Complete
in your .vimrc instead of the setlocal line.

All times are GMT -5. The time now is 09:18 PM.