mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-07 03:04:30 +08:00
make it possible to disable commands
This commit is contained in:
@@ -120,7 +120,7 @@ and usually saves one keypress.
|
||||
let g:jedi#popup_select_first = 0
|
||||
|
||||
Here are a few more defaults for actions, read the docs (``:help jedi-vim``) to
|
||||
get more information. You can change them
|
||||
get more information. If you set them to ``""``, they are not assigned.
|
||||
|
||||
.. code-block:: vim
|
||||
|
||||
@@ -133,7 +133,6 @@ get more information. You can change them
|
||||
let g:jedi#show_call_signatures = "1"
|
||||
|
||||
|
||||
|
||||
Testing
|
||||
=======
|
||||
|
||||
|
||||
@@ -192,6 +192,9 @@ a mapping yourself by calling a function: >
|
||||
nnoremap <silent> <buffer> <localleader>r :call jedi#rename()<cr>
|
||||
" etc.
|
||||
|
||||
Note: You can set commands to '', which means that they are empty and not
|
||||
assigned. It's an easy way to "disable" functionality of jedi-vim.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
5.1. `g:jedi#completions_command` *g:jedi#completions_command*
|
||||
Function: n/a; see above
|
||||
|
||||
@@ -11,6 +11,7 @@ if g:jedi#auto_initialization
|
||||
setlocal omnifunc=jedi#completions
|
||||
|
||||
" map ctrl+space for autocompletion
|
||||
|
||||
if g:jedi#completions_command == "<C-Space>"
|
||||
" in terminals, <C-Space> sometimes equals <Nul>
|
||||
inoremap <expr> <Nul> pumvisible() \|\| &omnifunc == '' ?
|
||||
@@ -19,16 +20,28 @@ if g:jedi#auto_initialization
|
||||
\ "\"\\<lt>c-n>\\<lt>c-p>\\<lt>c-n>\" :" .
|
||||
\ "\" \\<lt>bs>\\<lt>C-n>\"\<CR>"
|
||||
endif
|
||||
execute "inoremap <buffer>".g:jedi#completions_command." <C-X><C-O>"
|
||||
if g:jedi#completions_command != ""
|
||||
execute "inoremap <buffer>".g:jedi#completions_command." <C-X><C-O>"
|
||||
endif
|
||||
|
||||
" goto / get_definition / usages
|
||||
execute "noremap <buffer>".g:jedi#goto_assignments_command." :call jedi#goto_assignments()<CR>"
|
||||
execute "noremap <buffer>".g:jedi#goto_definitions_command." :call jedi#goto_definitions()<CR>"
|
||||
execute "noremap <buffer>".g:jedi#usages_command." :call jedi#usages()<CR>"
|
||||
if g:jedi#goto_assignments_command != ''
|
||||
execute "noremap <buffer>".g:jedi#goto_assignments_command." :call jedi#goto_assignments()<CR>"
|
||||
endif
|
||||
if g:jedi#goto_definitions_command != ''
|
||||
execute "noremap <buffer>".g:jedi#goto_definitions_command." :call jedi#goto_definitions()<CR>"
|
||||
endif
|
||||
if g:jedi#usages_command != ''
|
||||
execute "noremap <buffer>".g:jedi#usages_command." :call jedi#usages()<CR>"
|
||||
endif
|
||||
" rename
|
||||
execute "noremap <buffer>".g:jedi#rename_command." :call jedi#rename()<CR>"
|
||||
if g:jedi#rename_command != ''
|
||||
execute "noremap <buffer>".g:jedi#rename_command." :call jedi#rename()<CR>"
|
||||
endif
|
||||
" documentation/pydoc
|
||||
execute "nnoremap <silent> <buffer>".g:jedi#documentation_command." :call jedi#show_documentation()<CR>"
|
||||
if g:jedi#documentation_command != ''
|
||||
execute "nnoremap <silent> <buffer>".g:jedi#documentation_command." :call jedi#show_documentation()<CR>"
|
||||
endif
|
||||
|
||||
if g:jedi#show_call_signatures == 1 && has('conceal')
|
||||
call jedi#configure_call_signatures()
|
||||
|
||||
Reference in New Issue
Block a user