View the Most Wanted LQ Wiki articles.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-07-2008, 06:40 PM   #1
Registered: May 2004
Posts: 175

Rep: Reputation: 15
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
Old 03-08-2008, 07:36 PM   #2
Registered: Apr 2006
Distribution: Fedora
Posts: 478

Rep: Reputation: 30

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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vim omin-completion for PHP rmanocha Linux - Software 1 05-16-2008 09:46 AM
code completion in kdevelop (C++) ManuPeng Linux - Desktop 1 01-28-2007 01:07 AM
? about code completion tool. -> RHLinuxGUY Programming 6 03-06-2006 12:32 AM
code completion in KDevelop dvm Programming 1 05-15-2005 06:35 AM
does vim have an option for code completion? sneak Linux - Software 4 07-20-2004 07:05 AM

All times are GMT -5. The time now is 12:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration