1
0
mirror of https://github.com/aquatix/dotfiles.git synced 2025-12-06 22:55:10 +01:00

Better tab behaviour in deoplete, still not as nice as YCM

This commit is contained in:
2019-02-10 21:31:36 +01:00
parent 777cd6c46e
commit bf8a2f9a73

10
.vimrc
View File

@@ -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 <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ deoplete#manual_complete()
endif