1
0
mirror of https://github.com/amix/vimrc synced 2025-07-13 23:05:01 +08:00

jedi for python

This commit is contained in:
liushouda
2015-07-24 19:34:08 +08:00
parent 2a8d620b8a
commit d931023720
27 changed files with 2517 additions and 0 deletions

View File

@ -0,0 +1,23 @@
if !jedi#init_python()
finish
endif
if g:jedi#auto_initialization
if g:jedi#completions_enabled
" We need our own omnifunc, so this overrides the omnifunc set by
" $VIMRUNTIME/ftplugin/python.vim.
setlocal omnifunc=jedi#completions
" map ctrl+space for autocompletion
if g:jedi#completions_command == "<C-Space>"
" In terminals, <C-Space> sometimes equals <Nul>.
imap <buffer> <Nul> <C-Space>
smap <buffer> <Nul> <C-Space>
endif
if g:jedi#completions_command != ""
execute "inoremap <expr> <buffer> ".g:jedi#completions_command." jedi#complete_string(0)"
" A separate mapping for select mode: deletes and completes.
execute "snoremap <expr> <buffer> ".g:jedi#completions_command." '\<C-g>c'.jedi#complete_string(0)"
endif
endif
endif