add autocompletion_command default -> fixes #51

This commit is contained in:
David Halter
2012-12-18 17:14:58 +01:00
parent 704c1c2553
commit 730c98ff67
3 changed files with 12 additions and 2 deletions

View File

@@ -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"
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
currently in. If you don't want that::

View File

@@ -6,9 +6,14 @@ let b:did_ftplugin = 1
if g:jedi#auto_initialization
setlocal omnifunc=jedi#complete
echom g:jedi#autocompletion_command
" map ctrl+space for autocompletion
inoremap <buffer> <Nul> <C-X><C-O>
inoremap <buffer> <C-Space> <C-X><C-O>
if g:jedi#autocompletion_command == "<C-Space>"
" 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
execute "noremap <buffer>".g:jedi#goto_command." :call jedi#goto()<CR>"

View File

@@ -24,6 +24,7 @@ let s:settings = {
\ 'auto_initialization': 1,
\ 'auto_vim_configuration': 1,
\ 'goto_command': "'<leader>g'",
\ 'autocompletion_command': "'<C-Space>'",
\ 'get_definition_command': "'<leader>d'",
\ 'related_names_command': "'<leader>n'",
\ 'rename_command': "'<leader>r'",