diff --git a/README.rst b/README.rst index fcfe148..df275b8 100644 --- a/README.rst +++ b/README.rst @@ -97,6 +97,10 @@ And you can list all names that are related (have the same origin):: let g:jedi#related_names_command = "n" +If you want to change the default autocompletion command:: + + let g:jedi#autocompletion_command = "" + By default you get a window that displays the function definition you're currently in. If you don't want that:: diff --git a/ftplugin/python/jedi.vim b/ftplugin/python/jedi.vim index 7e74ff6..2a6b06d 100644 --- a/ftplugin/python/jedi.vim +++ b/ftplugin/python/jedi.vim @@ -6,9 +6,14 @@ let b:did_ftplugin = 1 if g:jedi#auto_initialization setlocal omnifunc=jedi#complete + + echom g:jedi#autocompletion_command " map ctrl+space for autocompletion - inoremap - inoremap + if g:jedi#autocompletion_command == "" + " in terminals, sometimes equals + inoremap + endif + execute "inoremap ".g:jedi#autocompletion_command." " " goto / get_definition / related_names execute "noremap ".g:jedi#goto_command." :call jedi#goto()" diff --git a/plugin/jedi.vim b/plugin/jedi.vim index 1406664..ed70117 100644 --- a/plugin/jedi.vim +++ b/plugin/jedi.vim @@ -24,6 +24,7 @@ let s:settings = { \ 'auto_initialization': 1, \ 'auto_vim_configuration': 1, \ 'goto_command': "'g'", + \ 'autocompletion_command': "''", \ 'get_definition_command': "'d'", \ 'related_names_command': "'n'", \ 'rename_command': "'r'",