LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-27-2011, 04:02 PM   #1
tadeas
Member
 
Registered: Jul 2008
Location: Prague
Distribution: Opensuse
Posts: 40

Rep: Reputation: 5
Vim intelligent python completion


Hello,
I'm struggling to get pythoncomplete to work. I have this in .vimrc:
Code:
autocmd FileType python set omnifunc=pythoncomplete#Complete
CTags is loaded and functional (CList works fine, so does jumping to function declaration with C+] )
However C-X, C-O prints "Omni completion (^O^N^P) Pattern not found". C-N and C-P suggest words by fulltext - most recent first.
I've tried to put pythoncomplete ( http://www.vim.org/scripts/script.php?script_id=1542 ) to .vim/autoload/ and it didn't help.

Can it do anything more intelligent than suggest most recent words by fulltext?
 
Old 12-27-2011, 04:07 PM   #2
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,615

Rep: Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415
I swear by neocomplcache:

https://github.com/Shougo/neocomplcache
 
Old 01-01-2012, 12:19 PM   #3
tadeas
Member
 
Registered: Jul 2008
Location: Prague
Distribution: Opensuse
Posts: 40

Original Poster
Rep: Reputation: 5
Thank you for the suggestion. What benefits does neocomplcache bring over the defalt (fulltext) code completion? In Python?
Can you show me your configuration please?
 
Old 01-01-2012, 01:54 PM   #4
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,615

Rep: Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415
My .vimrc file is here:

https://github.com/duganchen/dotfile.../master/.vimrc

Neocomplcache works more like a normal IDE; it gives you the autocompletion menu as you type.
 
Old 01-02-2012, 08:55 AM   #5
tadeas
Member
 
Registered: Jul 2008
Location: Prague
Distribution: Opensuse
Posts: 40

Original Poster
Rep: Reputation: 5
Quote:
Originally Posted by dugan View Post
Thank you very much. It looks like you don't have any special neocomplcache settings.
Quote:
Originally Posted by dugan View Post
Neocomplcache works more like a normal IDE; it gives you the autocompletion menu as you type.
Does it suggest words by some sort of analysis of the code or just fulltext? Vim does pretty good job at autocompletion itself, but it only suggests words by fulltext. I'm looking for something that will be more "intelligent". E.g. I have class "A" with methods "abc" and "def". I create variable "a", an instance of "A". When I type "a.", I want it to suggest "abc(" and "def(".
 
Old 01-02-2012, 11:19 AM   #6
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,615

Rep: Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415
Quote:
Originally Posted by tadeas View Post
Does it... I'm looking for something that will be more...
Why are you wasting your time asking this when all you need to do is try it out?
 
Old 01-02-2012, 01:41 PM   #7
tadeas
Member
 
Registered: Jul 2008
Location: Prague
Distribution: Opensuse
Posts: 40

Original Poster
Rep: Reputation: 5
I did try it. It doesn't do what I'm looking for. But there might be some misconfiguration, wrong versions or whatever. So I ask how does it work for you (or anyone else).
 
  


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
[SOLVED] VIM auto completion possum Linux - Newbie 3 04-23-2011 01:29 PM
vim: auto-completion in ex chexmix Solaris / OpenSolaris 1 08-28-2008 02:26 PM
Vim omin-completion for PHP rmanocha Linux - Software 1 05-16-2008 09:46 AM
vim code completion problem shogun1234 Linux - Software 1 03-08-2008 07:36 PM
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 09:21 PM.

Main Menu
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