diff --git a/jedi.vim b/jedi.vim index 93c7fd3..77f7eef 100644 --- a/jedi.vim +++ b/jedi.vim @@ -244,22 +244,22 @@ if !exists("g:jedi#pydoc") endif if g:jedi#auto_initialization - autocmd FileType python set omnifunc=jedi#complete + autocmd FileType python setlocal omnifunc=jedi#complete " map ctrl+space for autocompletion - imap + autocmd FileType python inoremap " goto / get_definition - execute "noremap ".g:jedi#goto_command." :call jedi#goto()" - execute "noremap ".g:jedi#get_definition_command." :call jedi#get_definition()" + autocmd FileType python execute "noremap ".g:jedi#goto_command." :call jedi#goto()" + autocmd FileType python execute "noremap ".g:jedi#get_definition_command." :call jedi#get_definition()" - execute "nnoremap ".g:jedi#pydoc." :call jedi#show_pydoc()" + autocmd FileType python execute "nnoremap ".g:jedi#pydoc." :call jedi#show_pydoc()" end if g:jedi#popup_on_dot - autocmd FileType python imap . .=jedi#do_popup_on_dot() ? "\C-X>\C-O>" : "" + autocmd FileType python inoremap . .=jedi#do_popup_on_dot() ? "\C-X>\C-O>" : "" end -setlocal switchbuf=useopen " needed for pydoc +set switchbuf=useopen " needed for pydoc let s:current_file=expand("") python << PYTHONEOF