mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-23 04:57:36 +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-jedi', { 'for': 'python' }
|
||||||
Plug 'zchee/deoplete-go', { 'do': 'make' }
|
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>
|
inoremap <silent><expr> <C-Space>
|
||||||
\ pumvisible() ? "\<C-n>" :
|
\ pumvisible() ? "\<C-n>" :
|
||||||
\ <SID>check_back_space() ? "\<C-Space>" :
|
\ <SID>check_back_space() ? "\<C-Space>" :
|
||||||
\ deoplete#manual_complete()
|
\ deoplete#manual_complete()
|
||||||
|
|
||||||
function! s:check_back_space() abort "{{{
|
function! s:check_back_space() abort "{{{
|
||||||
let col = col('.') - 1
|
let col = col('.') - 1
|
||||||
@ -17,6 +17,9 @@ function! s:check_back_space() abort "{{{
|
|||||||
endfunction
|
endfunction
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
|
" Auto close preview when done
|
||||||
|
autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
|
||||||
|
|
||||||
if !exists('g:deoplete#sources')
|
if !exists('g:deoplete#sources')
|
||||||
let g:deoplete#sources = {}
|
let g:deoplete#sources = {}
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user