Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim-jedi autocomplete not working

I just installed jedi-vim with vundle My vim version is 7.3.429. I installed jedi vi pip

every time I hit . or <C-Space> I get this error.

Omni completion (^O^N^P) Pattern not found

when I searched here for this pattern I found a solution to use vim-jedi instead. But unfortunatelly this occours with jedi-vim.

Here is some output of some registers:

:set omnifunc

omnifunc=jedi#complete


:messages

Messages maintainer: Bram Moolenaar <[email protected]>
"models.py" 31L, 1052C
<emptyline>
like image 831
HWM-Rocker Avatar asked Oct 23 '12 07:10

HWM-Rocker


People also ask

How do I turn on autocomplete in VIM?

vimrc configuration file. Next, we'll enter a few characters of a word we need to write and press Ctrl-N to trigger autocompletion. We can select the preferable term from the list. Also, to see Vim's documentation on the autocomplete functionality, we can use :help i_CTRL-N.

What is VIM Jedi?

jedi-vim is a VIM binding to the autocompletion library Jedi. Here are some pictures: Completion for almost anything (Ctrl+Space).

What is Python Jedi?

Jedi is a static analysis tool for Python that is typically used in IDEs/editors plugins. Jedi has a focus on autocompletion and goto functionality. Other features include refactoring, code search and finding references. Jedi has a simple API to work with. There is a reference implementation as a VIM-Plugin.


2 Answers

Because this line was in my .vimrc:

autocmd FileType python setlocal omnifunc=pythoncomplete#Complete

I could not use jedi for a long time. When removed it, it's OK.

:set omnifunc
omnifunc=jedi#completions
like image 67
thinker3 Avatar answered Sep 29 '22 14:09

thinker3


IIRC, jedi-vim was publicly released one or two weeks ago. I doubt you will get much help outside of its issue tracker.

Anyway, the plugin seems to be using Vim's omni completion under the hood, specifically the <C-x><C-o> shortcut which, in your case, doesn't seem to return anything because it can't recognize the keyword before the ..

Either jedi-vim doesn't work or your code is wrong or the plugin is badly installed.

like image 32
romainl Avatar answered Sep 29 '22 14:09

romainl