Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just started using vim and saw a cool plugin: neocomplcache.

My problem is that I can't get it to work properly. After installing, I took the example config from the help files of neocomplcache and added the lines to my .vimrc

At first I wanted to create a simple LaTeX file (there are snippets for TeX). After typing "begi" there appears a menu, I can choose between the snippets with Tab or Ctrl-N. But how do I get them to expand? Ctrl-K does not work, but I don't understand why.



" Plugin key-mappings.

imap <C-k>     <Plug>(neocomplcache_snippets_expand)

smap <C-k>     <Plug>(neocomplcache_snippets_expand)

inoremap <expr><C-g>     neocomplcache#undo_completion()

inoremap <expr><C-l>     neocomplcache#complete_common_string()

" 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()

share|improve this question
I have <C-k> just works now with Neocomplcache version 6.0. is there any key-mapping conflict? what does :verbose map <c-k> shows? – number5 Mar 2 '11 at 0:09

Typing <C-y> will insert the selected keyword and close the popup.
Typing <C-l> will insert the common substring between the matches in the popup.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .