LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Vim intelligent python completion (http://www.linuxquestions.org/questions/programming-9/vim-intelligent-python-completion-920776/)

tadeas 12-27-2011 04:02 PM

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?

dugan 12-27-2011 04:07 PM

I swear by neocomplcache:

https://github.com/Shougo/neocomplcache

tadeas 01-01-2012 12:19 PM

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?

dugan 01-01-2012 01:54 PM

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.

tadeas 01-02-2012 08:55 AM

Quote:

Originally Posted by dugan (Post 4563234)

Thank you very much. It looks like you don't have any special neocomplcache settings.
Quote:

Originally Posted by dugan (Post 4563234)
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(".

dugan 01-02-2012 11:19 AM

Quote:

Originally Posted by tadeas (Post 4563759)
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?

tadeas 01-02-2012 01:41 PM

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).


All times are GMT -5. The time now is 04:48 PM.