diff --git a/autoload/jedi.vim b/autoload/jedi.vim index 997a4cd..b1041a7 100644 --- a/autoload/jedi.vim +++ b/autoload/jedi.vim @@ -159,6 +159,11 @@ function! jedi#configure_function_definition() autocmd CursorMovedI call jedi#show_func_def() endfunction +if has('python') + command! -nargs=1 Python python +else + command! -nargs=1 Python python3 +end Python << PYTHONEOF """ here we initialize the jedi stuff """ diff --git a/ftplugin/python/jedi.vim b/ftplugin/python/jedi.vim index 3bf131c..80691f2 100644 --- a/ftplugin/python/jedi.vim +++ b/ftplugin/python/jedi.vim @@ -41,13 +41,13 @@ end if g:jedi#popup_on_dot if stridx(&completeopt, 'longest') > -1 if g:jedi#popup_select_first - inoremap . .=jedi#do_popup_on_dot() ? "\C-X>\C-O>\C-N>" : "" + inoremap . .=jedi#do_popup_on_dot() ? "\C-X>\C-O>\C-N>" : "" else - inoremap . .=jedi#do_popup_on_dot() ? "\C-X>\C-O>" : "" + inoremap . .=jedi#do_popup_on_dot() ? "\C-X>\C-O>" : "" end else - inoremap . .=jedi#do_popup_on_dot() ? "\C-X>\C-O>\C-P>" : "" + inoremap . .=jedi#do_popup_on_dot() ? "\C-X>\C-O>\C-P>" : "" end end diff --git a/plugin/jedi.vim b/plugin/jedi.vim index e7ee905..707ad1d 100644 --- a/plugin/jedi.vim +++ b/plugin/jedi.vim @@ -51,11 +51,4 @@ if g:jedi#auto_initialization " order of invocation. autocmd FileType Python setlocal omnifunc=jedi#complete switchbuf=useopen " needed for pydoc endif - -if has('python') - command! -nargs=1 Python python -else - command! -nargs=1 Python python3 -end - " vim: set et ts=4: