forked from VimPlug/jedi-vim
Merge pull request #397 from blueyed/select-mode-mapping
Select mode mapping for completion trigger
This commit is contained in:
@@ -10,11 +10,14 @@ if g:jedi#auto_initialization
|
||||
|
||||
" map ctrl+space for autocompletion
|
||||
if g:jedi#completions_command == "<C-Space>"
|
||||
" in terminals, <C-Space> sometimes equals <Nul>
|
||||
inoremap <expr> <Nul> jedi#complete_string(0)
|
||||
" In terminals, <C-Space> sometimes equals <Nul>.
|
||||
imap <buffer> <Nul> <C-Space>
|
||||
smap <buffer> <Nul> <C-Space>
|
||||
endif
|
||||
if g:jedi#completions_command != ""
|
||||
execute "inoremap <expr> <buffer> ".g:jedi#completions_command." jedi#complete_string(0)"
|
||||
" A separate mapping for select mode: deletes and completes.
|
||||
execute "snoremap <expr> <buffer> ".g:jedi#completions_command." '\<C-g>c'.jedi#complete_string(0)"
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user