ctrl space cycles now through results, when used multiple times, fixes #118

This commit is contained in:
David Halter
2013-05-18 19:55:30 +04:30
parent 3ae35c1ea1
commit 403028a50c

View File

@@ -13,7 +13,11 @@ if g:jedi#auto_initialization
" map ctrl+space for autocompletion
if g:jedi#autocompletion_command == "<C-Space>"
" in terminals, <C-Space> sometimes equals <Nul>
inoremap <buffer><Nul> <C-X><C-O>
inoremap <expr> <Nul> pumvisible() \|\| &omnifunc == '' ?
\ "\<lt>C-n>" :
\ "\<lt>C-x>\<lt>C-o><c-r>=pumvisible() ?" .
\ "\"\\<lt>c-n>\\<lt>c-p>\\<lt>c-n>\" :" .
\ "\" \\<lt>bs>\\<lt>C-n>\"\<CR>"
endif
execute "inoremap <buffer>".g:jedi#autocompletion_command." <C-X><C-O>"