mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-07 03:04:30 +08:00
python -> Python
This commit is contained in:
@@ -2,51 +2,51 @@
|
|||||||
" functions that call python code
|
" functions that call python code
|
||||||
" ------------------------------------------------------------------------
|
" ------------------------------------------------------------------------
|
||||||
function! jedi#goto()
|
function! jedi#goto()
|
||||||
python jedi_vim.goto()
|
Python jedi_vim.goto()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
function! jedi#get_definition()
|
function! jedi#get_definition()
|
||||||
python jedi_vim.goto(is_definition=True)
|
Python jedi_vim.goto(is_definition=True)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
function! jedi#related_names()
|
function! jedi#related_names()
|
||||||
python jedi_vim.goto(is_related_name=True)
|
Python jedi_vim.goto(is_related_name=True)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
function! jedi#rename(...)
|
function! jedi#rename(...)
|
||||||
python jedi_vim.rename()
|
Python jedi_vim.rename()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
function! jedi#complete(findstart, base)
|
function! jedi#complete(findstart, base)
|
||||||
python jedi_vim.complete()
|
Python jedi_vim.complete()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
function! jedi#show_func_def()
|
function! jedi#show_func_def()
|
||||||
python jedi_vim.show_func_def()
|
Python jedi_vim.show_func_def()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! jedi#enable_speed_debugging()
|
function! jedi#enable_speed_debugging()
|
||||||
python jedi_vim.jedi.set_debug_function(jedi_vim.print_to_stdout, speed=True, warnings=False, notices=False)
|
Python jedi_vim.jedi.set_debug_function(jedi_vim.print_to_stdout, speed=True, warnings=False, notices=False)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! jedi#enable_debugging()
|
function! jedi#enable_debugging()
|
||||||
python jedi_vim.jedi.set_debug_function(jedi_vim.print_to_stdout)
|
Python jedi_vim.jedi.set_debug_function(jedi_vim.print_to_stdout)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! jedi#disable_debugging()
|
function! jedi#disable_debugging()
|
||||||
python jedi_vim.jedi.set_debug_function(None)
|
Python jedi_vim.jedi.set_debug_function(None)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" ------------------------------------------------------------------------
|
" ------------------------------------------------------------------------
|
||||||
" show_pydoc
|
" show_pydoc
|
||||||
" ------------------------------------------------------------------------
|
" ------------------------------------------------------------------------
|
||||||
function! jedi#show_pydoc()
|
function! jedi#show_pydoc()
|
||||||
python << PYTHONEOF
|
Python << PYTHONEOF
|
||||||
if 1:
|
if 1:
|
||||||
script = jedi_vim.get_script()
|
script = jedi_vim.get_script()
|
||||||
try:
|
try:
|
||||||
@@ -110,12 +110,12 @@ endfunction
|
|||||||
" ------------------------------------------------------------------------
|
" ------------------------------------------------------------------------
|
||||||
function! jedi#new_buffer(path)
|
function! jedi#new_buffer(path)
|
||||||
if g:jedi#use_tabs_not_buffers
|
if g:jedi#use_tabs_not_buffers
|
||||||
python jedi_vim.tabnew(jedi_vim.escape_file_path(vim.eval('a:path')))
|
Python jedi_vim.tabnew(jedi_vim.escape_file_path(vim.eval('a:path')))
|
||||||
else
|
else
|
||||||
if !&hidden && &modified
|
if !&hidden && &modified
|
||||||
w
|
w
|
||||||
endif
|
endif
|
||||||
python vim.command('edit ' + jedi_vim.escape_file_path(vim.eval('a:path')))
|
Python vim.command('edit ' + jedi_vim.escape_file_path(vim.eval('a:path')))
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@@ -173,12 +173,12 @@ function! jedi#do_popup_on_dot()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
function! jedi#configure_function_definition()
|
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
|
Python << PYTHONEOF
|
||||||
""" here we initialize the jedi stuff """
|
""" here we initialize the jedi stuff """
|
||||||
import vim
|
import vim
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ import jedi_vim
|
|||||||
sys.path.pop(1)
|
sys.path.pop(1)
|
||||||
|
|
||||||
PYTHONEOF
|
PYTHONEOF
|
||||||
"python jedi_vim.jedi.set_debug_function(jedi_vim.print_to_stdout, speed=True, warnings=False, notices=False)
|
"Python jedi_vim.jedi.set_debug_function(jedi_vim.print_to_stdout, speed=True, warnings=False, notices=False)
|
||||||
"python jedi_vim.jedi.set_debug_function(jedi_vim.print_to_stdout)
|
"Python jedi_vim.jedi.set_debug_function(jedi_vim.print_to_stdout)
|
||||||
|
|
||||||
" vim: set et ts=4:
|
" vim: set et ts=4:
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ if g:jedi#auto_initialization
|
|||||||
" this is only here because in some cases the VIM library adds their
|
" this is only here because in some cases the VIM library adds their
|
||||||
" autocompletion as a default, which may cause problems, depending on the
|
" autocompletion as a default, which may cause problems, depending on the
|
||||||
" order of invocation.
|
" order of invocation.
|
||||||
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
|
||||||
|
|
||||||
if has('python')
|
if has('python')
|
||||||
|
|||||||
Reference in New Issue
Block a user