hrsh7th/nvim-compe

FR/Question: Complete on any key

Liquidmantis opened this issue · 3 comments

As hinted in the subject, this might just be a question and something simple that I'm missing. Since I have noselect enabled, I have to actively select a completion option and intuitively it feels like I should be able to accept a highlighted option with any key that isn't scroll related.

I must have had this expectation ingrained from prior editors, but using <CR> to accept is non-intuitive for me and occasionally leads to unwanted line breaks. My expected behavior is that after I highlight an option something like space, period, comma, single/double quote, parentheses, brackets, etc. should accept the highlight and add the additional character.

Actually, typing this out makes me realize that maybe the set of next characters is small enough that I can add mappings for them explicitly. I'll work on that for now but would love if someone slaps me and points me at a simpler solution.

It is hard to understand by long description.
I think it should be described by screeshot and examples.

You can use C-y to accept the highlight candidate.
Yes, you can map it to other key to save the accept key.
But it increases your typo easily
(Because I had mapped the key...

Thanks for the quick reply! Actually C-y works great as it's a nice rhythm to C-n to highlight and C-y to accept then continue. It feels more natural than CR to me and I'd rather that accept and return.
Thanks again!