2019-02-11 21:19:13 +01:00
|
|
|
" Enable deoplete
|
2019-02-11 01:58:26 +01:00
|
|
|
let g:deoplete#enable_at_startup = 1
|
2019-02-13 00:35:28 +01:00
|
|
|
let g:deoplete#complete_method = "omnifunc"
|
|
|
|
let g:deoplete#auto_complete_delay = 0
|
2019-02-14 03:22:58 +01:00
|
|
|
" let g:deoplete#ignore_sources = ['buffer']
|
|
|
|
|
2019-02-11 21:19:13 +01:00
|
|
|
" <TAB>: completion.
|
2019-02-13 00:35:28 +01:00
|
|
|
""inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
|
|
|
|
"use TAB as the mapping
|
|
|
|
inoremap <silent><expr> <TAB>
|
|
|
|
\ pumvisible() ? "\<C-n>" :
|
|
|
|
\ <SID>check_back_space() ? "\<TAB>" :
|
|
|
|
\ deoplete#mappings#manual_complete()
|
|
|
|
function! s:check_back_space() abort ""
|
|
|
|
let col = col('.') - 1
|
|
|
|
return !col || getline('.')[col - 1] =~ '\s'
|
|
|
|
endfunction ""
|
|
|
|
inoremap <silent><expr><S-TAB> pumvisible() ? "\<C-p>" : "\<TAB>"
|
|
|
|
inoremap <expr><BS> deoplete#smart_close_popup()."\<C-h>"
|