Howto setup neocomplcache?

Posted by eddy on Super User See other posts from Super User or by eddy
Published on 2010-11-27T00:39:18Z Indexed on 2012/09/27 21:40 UTC
Read the original article Hit count: 249

Filed under:
|

I just started using vim and saw a cool plugin: [neocomplcache].(http://www.vim.org/scripts/script.php?script_id=2620)

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 <C-n>. But how do I get them to expand? <C-k> does not work, but I don't understand why.

========
.vimrc:
========

....

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

...

© Super User or respective owner

Related posts about vim

Related posts about gvim