mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-22 23:27:34 +00:00
Fix deoplete preview window closing
This commit is contained in:
parent
729a912244
commit
8f93dd590d
@ -5,11 +5,11 @@ Plug 'Shougo/neco-syntax'
|
||||
Plug 'zchee/deoplete-jedi', { 'for': 'python' }
|
||||
Plug 'zchee/deoplete-go', { 'do': 'make' }
|
||||
|
||||
" inoremap <silent><expr> <nul> pumvisible() ? "\<C-n>" : deoplete#mappings#manual_complete()
|
||||
" Auto complete with C-Space
|
||||
inoremap <silent><expr> <C-Space>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<C-Space>" :
|
||||
\ deoplete#manual_complete()
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<C-Space>" :
|
||||
\ deoplete#manual_complete()
|
||||
|
||||
function! s:check_back_space() abort "{{{
|
||||
let col = col('.') - 1
|
||||
@ -17,6 +17,9 @@ function! s:check_back_space() abort "{{{
|
||||
endfunction
|
||||
"}}}
|
||||
|
||||
" Auto close preview when done
|
||||
autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
|
||||
|
||||
if !exists('g:deoplete#sources')
|
||||
let g:deoplete#sources = {}
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user