mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-07 03:04:30 +08:00
add autocompletion_command default -> fixes #51
This commit is contained in:
@@ -97,6 +97,10 @@ And you can list all names that are related (have the same origin)::
|
|||||||
|
|
||||||
let g:jedi#related_names_command = "<leader>n"
|
let g:jedi#related_names_command = "<leader>n"
|
||||||
|
|
||||||
|
If you want to change the default autocompletion command::
|
||||||
|
|
||||||
|
let g:jedi#autocompletion_command = "<C-Space>"
|
||||||
|
|
||||||
By default you get a window that displays the function definition you're
|
By default you get a window that displays the function definition you're
|
||||||
currently in. If you don't want that::
|
currently in. If you don't want that::
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,14 @@ let b:did_ftplugin = 1
|
|||||||
|
|
||||||
if g:jedi#auto_initialization
|
if g:jedi#auto_initialization
|
||||||
setlocal omnifunc=jedi#complete
|
setlocal omnifunc=jedi#complete
|
||||||
|
|
||||||
|
echom g:jedi#autocompletion_command
|
||||||
" map ctrl+space for autocompletion
|
" map ctrl+space for autocompletion
|
||||||
inoremap <buffer> <Nul> <C-X><C-O>
|
if g:jedi#autocompletion_command == "<C-Space>"
|
||||||
inoremap <buffer> <C-Space> <C-X><C-O>
|
" in terminals, <C-Space> sometimes equals <Nul>
|
||||||
|
inoremap <buffer><Nul> <C-X><C-O>
|
||||||
|
endif
|
||||||
|
execute "inoremap <buffer>".g:jedi#autocompletion_command." <C-X><C-O>"
|
||||||
|
|
||||||
" goto / get_definition / related_names
|
" goto / get_definition / related_names
|
||||||
execute "noremap <buffer>".g:jedi#goto_command." :call jedi#goto()<CR>"
|
execute "noremap <buffer>".g:jedi#goto_command." :call jedi#goto()<CR>"
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ let s:settings = {
|
|||||||
\ 'auto_initialization': 1,
|
\ 'auto_initialization': 1,
|
||||||
\ 'auto_vim_configuration': 1,
|
\ 'auto_vim_configuration': 1,
|
||||||
\ 'goto_command': "'<leader>g'",
|
\ 'goto_command': "'<leader>g'",
|
||||||
|
\ 'autocompletion_command': "'<C-Space>'",
|
||||||
\ 'get_definition_command': "'<leader>d'",
|
\ 'get_definition_command': "'<leader>d'",
|
||||||
\ 'related_names_command': "'<leader>n'",
|
\ 'related_names_command': "'<leader>n'",
|
||||||
\ 'rename_command': "'<leader>r'",
|
\ 'rename_command': "'<leader>r'",
|
||||||
|
|||||||
Reference in New Issue
Block a user