deoplete.vim 798 B

1234567891011121314151617181920212223
  1. " Enable deoplete
  2. let g:deoplete#enable_at_startup = 1
  3. let g:deoplete#complete_method = "omnifunc"
  4. let g:deoplete#auto_complete_delay = 0
  5. " let g:deoplete#ignore_sources = ['buffer']
  6. "better nav for omnicomplete
  7. inoremap <expr> <c-j> ("\<C-n>")
  8. inoremap <expr> <c-k> ("\<C-p>")
  9. "<TAB>: completion.
  10. ""inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
  11. "use TAB as the mapping
  12. inoremap <silent><expr> <TAB>
  13. \ pumvisible() ? "\<C-n>" :
  14. \ <SID>check_back_space() ? "\<TAB>" :
  15. \ deoplete#mappings#manual_complete()
  16. function! s:check_back_space() abort ""
  17. let col = col('.') - 1
  18. return !col || getline('.')[col - 1] =~ '\s'
  19. endfunction ""
  20. inoremap <silent><expr><S-TAB> pumvisible() ? "\<C-p>" : "\<TAB>"
  21. inoremap <expr><BS> deoplete#smart_close_popup()."\<C-h>"