Skip to content

Instantly share code, notes, and snippets.

@mccurdyc
Created June 20, 2018 12:44
Show Gist options
  • Save mccurdyc/51749f293a532c92466e7dd34a1de5d4 to your computer and use it in GitHub Desktop.
Save mccurdyc/51749f293a532c92466e7dd34a1de5d4 to your computer and use it in GitHub Desktop.
Deoplete NeoVim Configuration
" 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