LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 03-07-2008, 07:40 PM   #1
shogun1234
Member
 
Registered: May 2004
Posts: 167

Rep: Reputation: 15
vim code completion problem


I follow the instruction at http://www.vim.org/scripts/script.php?script_id=1785 to enable the code completion, but fail. Following is the steps I perform. What do I miss?

1.) unzip javacomplete.zip 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 Reflection.java 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, javacomplete.zip v0.77.1

Thank you very much
 
Old 03-08-2008, 08:36 PM   #2
JMJ_coder
Member
 
Registered: Apr 2006
Distribution: Fedora
Posts: 478

Rep: Reputation: 30
Hello,

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

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

Code:
package com.foo

import java.util.;

public class Test extends java.net.SocketImpl {
    private String name;
    private String title;
    
    void title() {
        String.class
    }
}
with the cursor immediately after the last s in String.class, does a menu come up like it does in this example picture? http://blog.chinaunix.net/photo/44758_070917101048.jpg

The instructions say that Reflection.java 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
Code:
setlocal omnifunc=javacomplete#Complete
And I might try if that doesn't work to put:

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


Reply


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 10:46 AM
code completion in kdevelop (C++) ManuPeng Linux - Desktop 1 01-28-2007 02:07 AM
? about code completion tool. -> RHLinuxGUY Programming 6 03-06-2006 01:32 AM
code completion in KDevelop dvm Programming 1 05-15-2005 07:35 AM
does vim have an option for code completion? sneak Linux - Software 4 07-20-2004 08:05 AM


All times are GMT -5. The time now is 07:56 PM.

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