mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-07 19:24:36 +08:00
Merge pull request #35 from mattn/delay_load
delay load python module. this change make bits faster.
This commit is contained in:
@@ -165,3 +165,26 @@ function! jedi#configure_function_definition()
|
|||||||
autocmd InsertLeave <buffer> python jedi_vim.clear_func_def()
|
autocmd InsertLeave <buffer> python jedi_vim.clear_func_def()
|
||||||
autocmd CursorMovedI <buffer> call jedi#show_func_def()
|
autocmd CursorMovedI <buffer> call jedi#show_func_def()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
python << PYTHONEOF
|
||||||
|
""" here we initialize the jedi stuff """
|
||||||
|
import vim
|
||||||
|
|
||||||
|
# update the system path, to include the jedi path
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
from os.path import dirname, abspath, join
|
||||||
|
sys.path.insert(0, join(dirname(dirname(abspath(vim.eval('expand("<sfile>")')))), 'jedi'))
|
||||||
|
|
||||||
|
# to display errors correctly
|
||||||
|
import traceback
|
||||||
|
|
||||||
|
# update the sys path to include the jedi_vim script
|
||||||
|
sys.path.append(abspath(dirname(vim.eval('expand("<sfile>")')+'/../plugin')))
|
||||||
|
import jedi_vim
|
||||||
|
sys.path.pop()
|
||||||
|
|
||||||
|
PYTHONEOF
|
||||||
|
|
||||||
|
" vim: set et ts=4:
|
||||||
|
|||||||
@@ -47,26 +47,4 @@ if g:jedi#auto_initialization
|
|||||||
autocmd FileType python setlocal omnifunc=jedi#complete switchbuf=useopen " needed for pydoc
|
autocmd FileType python setlocal omnifunc=jedi#complete switchbuf=useopen " needed for pydoc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
python << PYTHONEOF
|
|
||||||
""" here we initialize the jedi stuff """
|
|
||||||
import vim
|
|
||||||
|
|
||||||
# update the system path, to include the jedi path
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
from os.path import dirname, abspath, join
|
|
||||||
sys.path.insert(0, join(dirname(dirname(abspath(vim.eval('expand("<sfile>")')))), 'jedi'))
|
|
||||||
|
|
||||||
# to display errors correctly
|
|
||||||
import traceback
|
|
||||||
|
|
||||||
# update the sys path to include the jedi_vim script
|
|
||||||
sys.path.append(dirname(abspath(vim.eval('expand("<sfile>")'))))
|
|
||||||
import jedi_vim
|
|
||||||
sys.path.pop()
|
|
||||||
|
|
||||||
PYTHONEOF
|
|
||||||
|
|
||||||
" vim: set et ts=4:
|
" vim: set et ts=4:
|
||||||
|
|||||||
Reference in New Issue
Block a user