Skip to content

Instantly share code, notes, and snippets.

@renanivo
Created April 17, 2012 15:36
Show Gist options
  • Save renanivo/2406907 to your computer and use it in GitHub Desktop.
Save renanivo/2406907 to your computer and use it in GitHub Desktop.
use tabs in vim's neocomplcache plugin
" Recommended key-mappings.
" <CR>: close popup and save indent.
inoremap <expr><CR> neocomplcache#smart_close_popup() . "\<CR>"
" <TAB>: completion.
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
" <C-h>, <BS>: close popup and delete backword char.
inoremap <expr><C-h> neocomplcache#smart_close_popup()."\<C-h>"
inoremap <expr><BS> neocomplcache#smart_close_popup()."\<C-h>"
inoremap <expr><C-y> neocomplcache#close_popup()
inoremap <expr><C-e> neocomplcache#cancel_popup()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment