From 8f93dd590df89f7cb172866fcfe3d39b686561b4 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Tue, 31 Oct 2017 18:30:57 -0700 Subject: [PATCH] Fix deoplete preview window closing --- vim/rc/plugins/deoplete.rc.vim | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/vim/rc/plugins/deoplete.rc.vim b/vim/rc/plugins/deoplete.rc.vim index 1b48c9d..d4b5534 100644 --- a/vim/rc/plugins/deoplete.rc.vim +++ b/vim/rc/plugins/deoplete.rc.vim @@ -5,11 +5,11 @@ Plug 'Shougo/neco-syntax' Plug 'zchee/deoplete-jedi', { 'for': 'python' } Plug 'zchee/deoplete-go', { 'do': 'make' } -" inoremap pumvisible() ? "\" : deoplete#mappings#manual_complete() +" Auto complete with C-Space inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ deoplete#manual_complete() + \ pumvisible() ? "\" : + \ check_back_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 @@ -48,5 +51,5 @@ let g:jedi#auto_vim_configuration = 0 let g:jedi#completions_enabled = 0 let g:jedi#popup_on_dot = 0 let g:jedi#popup_select_first = 0 -let g:jedi#show_call_signatures = 0 +let g:jedi#show_call_signatures = 0 let g:jedi#smart_auto_mappings = 0