Vincent Linsong 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? 

The problem with highlighting the first entry is that you can't use
CTRL-N to use it.  You would get the second entry.  And using CTRL-N to
select an entry is the main method for completion.  Not many people know
about CTRL-Y.

-- 
DENNIS:  Listen -- strange women lying in ponds distributing swords is no
         basis for a system of government.  Supreme executive power derives
         from a mandate from the masses, not from some farcical aquatic
         ceremony.
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Reply via email to