Shougo / neocomplcache.vim

Ultimate auto-completion system for Vim.
http://www.vim.org/scripts/script.php?script_id=2620
1.72k stars 135 forks source link

Completion on space? #470

Closed jrhorn424 closed 10 years ago

jrhorn424 commented 10 years ago

I'd like neocomplcache to complete and close on space, while inserting a space. I've tried the following, but it doesn't work.

inoremap <expr><space> pumvisible() ? neocomplcache#smart_close_popup()."\<space>" : "\<space>"
Shougo commented 10 years ago

I think you should use neocomplcache#close_popup() instead of neocomplcache#smart_close_popup().

inoremap <expr><space> pumvisible() ? neocomplcache#smart_close_popup()."\<space>" : "\<space>"
jrhorn424 commented 10 years ago

That also fails. Both insert a space after the partial match instead of matching and then adding a space. Example

" `inor<space> foo` becomes:
inor foo
" expected:
inoremap foo

Does neocomplcache do something with spaces inside the plugin? I saw something in my searches that suggested it might have to do with collision with certain snippet plugins.

Shougo commented 10 years ago

That also fails. Both insert a space after the partial match instead of matching and then adding a space.

I think you don't select the candidate.

Does neocomplcache do something with spaces inside the plugin? I saw something in my searches that suggested it might have to do with collision with certain snippet plugins.

It depends on snippet engine.

jrhorn424 commented 10 years ago

I think you don't select the candidate.

The candidate is highlighted when I press tab. Sorry I didn't mention that previously.

It depends on snippet engine.

I did some searching and it might be related to my use of snipmate. Everything else is working fine for now, just a feature a missed from omnicompletion. Thanks for your help.