Georg Dahn wrote:

This behavior of <C-N> and <C-P> is not new, it was the same befor, too,
not only in Vim 7. It is not wise to change it and BTW, it is a good
behavior for most people.

> My main point is: I don't want to select entry in the completion menu
> by pressing CTRL-N or CTRL-P, instead, I want to input enough
> characters to make correct entry  become the first entry and it is
> highlighted, then I can use CTRL-Y(yes, I have mapped <Enter> to
> CTRL-Y since I am tempted to use <Enter>) to confirm the completion.

If you don't want your typed characters to be replaced by the first
completion, just add a mapping like this:

inoremap <C-Space> <C-N><C-P>

Instead of the above map, I set completeopt=menu,preview,longest to get it work.


and it won't be replaced. If you type, then the list of possible
completions gets smaller. You still have to select the correct entry by
yourself, but if I understand you correctly, this might be very near to
that, which you seem to want.

Yes, it is very near to what I want except one thing. But I don't get the point why disable to highlight the top entry in the menu in vim7f (it is not in vim7d)? And I am sure there are many persons who want to make the top entry highlighted by default. I am not very sure why this is changed in vim7f? Now, is there a easy way to make the top entry highlighted automatically?

Best wishes,
Georg

Thanks for your reply.

BR
Vincent

Reply via email to