From bf8a2f9a73318e22a2a1701235c07252c0cd8f8c Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Sun, 10 Feb 2019 21:31:36 +0100 Subject: [PATCH] Better tab behaviour in deoplete, still not as nice as YCM --- .vimrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.vimrc b/.vimrc index 4ccfbe5..eb4837f 100644 --- a/.vimrc +++ b/.vimrc @@ -295,6 +295,16 @@ Plugin 'zchee/deoplete-jedi' Plugin 'Shougo/neco-syntax' let g:deoplete#enable_at_startup = 1 + +" Enable tab complete +function! s:check_back_space() abort "{{{ + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~ '\s' +endfunction"}}} +inoremap + \ pumvisible() ? "\" : + \ check_back_space() ? "\" : + \ deoplete#manual_complete() endif