diff --git a/README.rst b/README.rst index 144b9df..fcfe148 100644 --- a/README.rst +++ b/README.rst @@ -62,6 +62,11 @@ you disable the auto-initialization in your ``.vimrc``:: let g:jedi#auto_initialization = 0 +There are also some VIM options (like ``completeopt``) which are automatically +initialized, if you don't want that: + + let g:jedi#auto_vim_configuration = 0 + The goto is by default on . If you want to change that:: let g:jedi#goto_command = "g" diff --git a/ftplugin/python/jedi.vim b/ftplugin/python/jedi.vim index 7eb025e..7e74ff6 100644 --- a/ftplugin/python/jedi.vim +++ b/ftplugin/python/jedi.vim @@ -24,6 +24,10 @@ if g:jedi#auto_initialization endif end +if g:jedi#auto_vim_configuration + setlocal completeopt=menuone,longest,preview +end + if g:jedi#popup_on_dot if stridx(&completeopt, 'longest') > -1 inoremap . .=jedi#do_popup_on_dot() ? "\C-X>\C-O>" : "" diff --git a/plugin/jedi.vim b/plugin/jedi.vim index db821e8..1406664 100644 --- a/plugin/jedi.vim +++ b/plugin/jedi.vim @@ -22,6 +22,7 @@ let g:loaded_jedi = 1 let s:settings = { \ 'use_tabs_not_buffers': 1, \ 'auto_initialization': 1, + \ 'auto_vim_configuration': 1, \ 'goto_command': "'g'", \ 'get_definition_command': "'d'", \ 'related_names_command': "'n'",