Search code examples
vimautocompletesupertabpython-jedi

Can't get Jedi's autocompletion on SuperTab


I installed both plugins using Pathogen, but they don't work together as it should be. That is, if I use TAB, I get SuperTab's completion (autocomplete what I have previously written) whereas if I use CTRL + SPACE I get Jedi's completion (everything from libs: classes, modules, etc).

In theory, if both plugins are installed SuperTab should handle Jedi seamlessly, but that's not my case. I found this report of some people experiencing the same behavior, while others saying it works for them. There is no solution provided though.

The plugins I'm using don't override each other:

ls ~/.vim/bundle/
auto-pairs  nerdtree  syntastic    vim-trailing-whitespace
jedi-vim    supertab  vim-airline

So what else may be causing this behavior?

vimrc:

set nu
set ts=4
set sw=4
set mouse=a
set showmatch
set expandtab
set background=dark
syntax on
filetype plugin indent on

execute pathogen#infect()

set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

Solution

  • Found the root of the problem. SuperTab wasn't working in OmniCompletion mode.

    let g:SuperTabContextDefaultCompletionType = "<c-x><c-o>"