forked from VimPlug/jedi-vim
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
|
let g:jedi#popup_select_first = 0
|
||||||
|
|
||||||
Here are a few more defaults for actions, read the docs (``:help jedi-vim``) to
|
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
|
.. code-block:: vim
|
||||||
|
|
||||||
@@ -133,7 +133,6 @@ get more information. You can change them
|
|||||||
let g:jedi#show_call_signatures = "1"
|
let g:jedi#show_call_signatures = "1"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
|||||||
@@ -192,6 +192,9 @@ a mapping yourself by calling a function: >
|
|||||||
nnoremap <silent> <buffer> <localleader>r :call jedi#rename()<cr>
|
nnoremap <silent> <buffer> <localleader>r :call jedi#rename()<cr>
|
||||||
" etc.
|
" 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*
|
5.1. `g:jedi#completions_command` *g:jedi#completions_command*
|
||||||
Function: n/a; see above
|
Function: n/a; see above
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ if g:jedi#auto_initialization
|
|||||||
setlocal omnifunc=jedi#completions
|
setlocal omnifunc=jedi#completions
|
||||||
|
|
||||||
" map ctrl+space for autocompletion
|
" map ctrl+space for autocompletion
|
||||||
|
|
||||||
if g:jedi#completions_command == "<C-Space>"
|
if g:jedi#completions_command == "<C-Space>"
|
||||||
" in terminals, <C-Space> sometimes equals <Nul>
|
" in terminals, <C-Space> sometimes equals <Nul>
|
||||||
inoremap <expr> <Nul> pumvisible() \|\| &omnifunc == '' ?
|
inoremap <expr> <Nul> pumvisible() \|\| &omnifunc == '' ?
|
||||||
@@ -19,16 +20,28 @@ if g:jedi#auto_initialization
|
|||||||
\ "\"\\<lt>c-n>\\<lt>c-p>\\<lt>c-n>\" :" .
|
\ "\"\\<lt>c-n>\\<lt>c-p>\\<lt>c-n>\" :" .
|
||||||
\ "\" \\<lt>bs>\\<lt>C-n>\"\<CR>"
|
\ "\" \\<lt>bs>\\<lt>C-n>\"\<CR>"
|
||||||
endif
|
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
|
" goto / get_definition / usages
|
||||||
execute "noremap <buffer>".g:jedi#goto_assignments_command." :call jedi#goto_assignments()<CR>"
|
if g:jedi#goto_assignments_command != ''
|
||||||
execute "noremap <buffer>".g:jedi#goto_definitions_command." :call jedi#goto_definitions()<CR>"
|
execute "noremap <buffer>".g:jedi#goto_assignments_command." :call jedi#goto_assignments()<CR>"
|
||||||
execute "noremap <buffer>".g:jedi#usages_command." :call jedi#usages()<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
|
" 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
|
" 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')
|
if g:jedi#show_call_signatures == 1 && has('conceal')
|
||||||
call jedi#configure_call_signatures()
|
call jedi#configure_call_signatures()
|
||||||
|
|||||||
Reference in New Issue
Block a user