let b:did_ftplugin = 1 if !has('python') finish endif " ------------------------------------------------------------------------ " Initialization of jedi-vim " ------------------------------------------------------------------------ if g:jedi#auto_initialization setlocal omnifunc=jedi#complete " map ctrl+space for autocompletion 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()" execute "noremap ".g:jedi#get_definition_command." :call jedi#get_definition()" execute "noremap ".g:jedi#related_names_command." :call jedi#related_names()" " rename execute "noremap ".g:jedi#rename_command." :call jedi#rename()" " pydoc execute "nnoremap ".g:jedi#pydoc." :call jedi#show_pydoc()" if g:jedi#show_function_definition == 1 && has('conceal') call jedi#configure_function_definition() endif end if g:jedi#auto_vim_configuration setlocal completeopt=menuone,longest,preview inoremap end if g:jedi#popup_on_dot if stridx(&completeopt, 'longest') > -1 inoremap . .=jedi#do_popup_on_dot() ? "\C-X>\C-O>" : "" else inoremap . .=jedi#do_popup_on_dot() ? "\C-X>\C-O>\C-P>" : "" end end if g:jedi#auto_close_doc " close preview if its still open after insert autocmd InsertLeave if pumvisible() == 0|pclose|endif end