Le Jeu 11 Mai 2006 00:18, Matt Zyzik a écrit :
> > > Ok good. However, I don't see why the item shouldn't be selected
> > > in the first place (as you type), like it was before. It seems
> > > like there was no harm in this, and also you can just hit <c-y>
> > > rather than <c-n><c-y>. And you could also start hitting <c-l>
> > > without having to hit <down> first.
> >
> > It's this way because people mentioned that CTRL-N didn't get the
> > first entry but the second one.  I think it's not illogical that
> > when you use "longest" that you get the longest common text and no
> > entry selected yet.
>
> Not a single IDE has the kind of completion system where the entry
> isn't selected as you type it. It's a speed convenience, that you can
> hit enter at any time to insert the entry into text. With Vim, I
> could hit <c-l> to keep completing, or <c-y> to select. I don't feel
> like having to type <c-n> before either of those two. It's too time
> consuming and annoying. Doesn't anyone agree?

well, IDE's are wrong.

moreover autocommands helps you here to implement such a behaviour.

> Who disagrees? 

I do, I hate when an IDE try to complete everytime, everywhere, with no 
idea of what I need for autocompletion. Especially since vim 
autocompletion is purely syntaxic (without clever omnicompletion at 
least) which can be bothering with big sources.

I love needing C-n (even if I remapped it to <tab> with clever 
heuristics to guess if I want autocompletion or <tab> ;p). I don't like 
the <c-y> to validate your choice, so I've used a hack that is 
suggested in the help:

    " make <enter> work in popup
    inoremap <cr> <C-R>=pumvisible() ? "\<lt>C-Y>" : "\<lt>cr>"<cr>

sadly I can't do the same with <esc> to exit the completion, because of 
<esc> beeing <esc> (and me using vim into non 8-bit capable terminals).

I'm perfectly happy with that, because I like my editor doing what I 
want, not what I *may* want.
-- 
·O·  Pierre Habouzit
··O                                                [EMAIL PROTECTED]
OOO                                                http://www.madism.org

Attachment: pgpIP7YAmNF4F.pgp
Description: PGP signature

Reply via email to