Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help on tuning neocomplcache #41

Closed
bybor opened this issue Aug 19, 2010 · 8 comments
Closed

Help on tuning neocomplcache #41

bybor opened this issue Aug 19, 2010 · 8 comments

Comments

@bybor
Copy link

bybor commented Aug 19, 2010

Could you create wiki page or put this in docs?

Is it possible to use necomplcache with following behavior:
1) disable auto popup
2) popup on
3) auto complete to common string and show available variants (if any), highlighting first available
4) switch between options with
5) choose option using

I understand that i could figure it out reading docs and giving it a try :-/
Thanks.

@Shougo
Copy link
Owner

Shougo commented Aug 20, 2010

I edited wiki page. Please check this.
http://wiki.github.com/Shougo/neocomplcache/neocomplcache-tips

  1. switch between options with <Tab>
  2. choose option using <CR>
    What kind of meaning is it?

@bybor
Copy link
Author

bybor commented Aug 20, 2010

by 'options' i mean alternative available variants in popup. So you hit 'tab' and popup appears. if you hit 'tab' when popup is open next line is active. if you hit 'enter' the current variant is completed, popup is closed.
thanks

@Shougo
Copy link
Owner

Shougo commented Aug 20, 2010

Please use this setting.

inoremap pumvisible() ? “” : check_back_space() ? “” : “”
inoremap neocomplcache#smart_close_popup() . “”

@bybor
Copy link
Author

bybor commented Aug 20, 2010

Have put all your tips to my .vimrc, using version from head.
doesn't work as expected.
closes popup, but ignores selected variant - it substitues the text that you typed before you pressed 'Tab'
If there is nothing to complete - if you type 'aaabbb' and hit the cursor is moved to next line.

@Shougo
Copy link
Owner

Shougo commented Aug 20, 2010

I do not understand it well. Please explain it in detail.
Probably you want to complete it like a shell.

@bybor
Copy link
Author

bybor commented Aug 20, 2010

Yes, it works good. Thank you very much for your time and effort.
I've found that this mapping

inoremap  neocomplcache#smart_close_popup() . “\”

causes problems in my case.

The only issue i see now, but it's not connected with this setup probably.
if you type some rubbish - that is not in your file and it can't be completed, for example you type 'asdfkjasfljakajdf' and hit after it, popup shows the list of all words in file, may be because of #complete_common_string(). If next thing you do is select one of them and press 'Enter' then selected variant is appended to what you typed, but doesn't replace it.
But it's not a big deal.
Thanks once again. I would never be able to tune it this way.

@Shougo
Copy link
Owner

Shougo commented Aug 20, 2010

Please update neocomplcache and set this settings.

inoremap <expr><TAB> pumvisible() ? "\<Down>" : <SID>check_back_space() ?  "\<TAB>" : "\<C-x>\<C-u>\<C-p>\<Down>"
inoremap <expr><CR> neocomplcache#smart_close_popup() . “\<CR>”
let g:neocomplcache_enable_auto_select = 1
let g:neocomplcache_disable_auto_complete = 1
setlocal completeopt+=longest

@bybor
Copy link
Author

bybor commented Aug 20, 2010

I like prev variant with common string. Thank you. It does everything i'd want.
Need to test it a little bit

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants