Created
June 20, 2018 12:44
-
-
Save mccurdyc/51749f293a532c92466e7dd34a1de5d4 to your computer and use it in GitHub Desktop.
Deoplete NeoVim Configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" map TAB, C-j to down in popup and C-k to up in popup | |
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>" | |
inoremap <expr> <C-j> pumvisible() ? "\<C-n>" : "\<C-j>" | |
inoremap <expr> <C-k> pumvisible() ? "\<C-p>" : "\<C-k>" | |
" manually trigger deoplete with TAB | |
call deoplete#custom#option('auto_complete', v:false) | |
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"}}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment