mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-06 10:54:22 +08:00
move also the whole python initialization away from plugin.vim
This commit is contained in:
@@ -168,12 +168,6 @@ function! jedi#_vim_exceptions(str, is_eval)
|
|||||||
return l:result
|
return l:result
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
if has('python')
|
|
||||||
command! -nargs=1 Python python <args>
|
|
||||||
else
|
|
||||||
command! -nargs=1 Python python3 <args>
|
|
||||||
end
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------
|
" ------------------------------------------------------------------------
|
||||||
" deprecations
|
" deprecations
|
||||||
" ------------------------------------------------------------------------
|
" ------------------------------------------------------------------------
|
||||||
@@ -226,6 +220,21 @@ for [key, val] in items(s:settings)
|
|||||||
endfor
|
endfor
|
||||||
|
|
||||||
|
|
||||||
|
" ------------------------------------------------------------------------
|
||||||
|
" Python initialization
|
||||||
|
" ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if has('python')
|
||||||
|
command! -nargs=1 Python python <args>
|
||||||
|
elseif has('python3')
|
||||||
|
command! -nargs=1 Python python3 <args>
|
||||||
|
else
|
||||||
|
if !exists("g:jedi#squelch_py_warning")
|
||||||
|
echomsg "Error: Required vim compiled with +python"
|
||||||
|
endif
|
||||||
|
finish
|
||||||
|
end
|
||||||
|
|
||||||
Python << PYTHONEOF
|
Python << PYTHONEOF
|
||||||
""" here we initialize the jedi stuff """
|
""" here we initialize the jedi stuff """
|
||||||
import vim
|
import vim
|
||||||
|
|||||||
@@ -1,28 +1,13 @@
|
|||||||
"jedi.vim - Omni Completion for python in vim
|
"jedi.vim - Omni Completion for python in vim
|
||||||
" Maintainer: David Halter <davidhalter88@gmail.com>
|
" Maintainer: David Halter <davidhalter88@gmail.com>
|
||||||
"
|
"
|
||||||
" This part of the software is just the vim interface. The main source code
|
" This part of the software is just the vim interface. The really big deal is
|
||||||
" lies in the python files around it.
|
" the Jedi Python library.
|
||||||
|
|
||||||
if !has('python') && !has('python3')
|
|
||||||
if !exists("g:jedi#squelch_py_warning")
|
|
||||||
echomsg "Error: Required vim compiled with +python"
|
|
||||||
endif
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
" load plugin only once
|
|
||||||
if exists("g:loaded_jedi") || &cp
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
let g:loaded_jedi = 1
|
|
||||||
|
|
||||||
|
|
||||||
if g:jedi#auto_vim_configuration
|
if g:jedi#auto_vim_configuration
|
||||||
filetype plugin on
|
filetype plugin on
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------
|
" ------------------------------------------------------------------------
|
||||||
" PyImport command
|
" PyImport command
|
||||||
" ------------------------------------------------------------------------
|
" ------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user