On Fri 6-Oct-06 12:25am -0600, Igor Prischepoff wrote:

> Well, i still don't understand vim logic behind that process.
>
> Let's see more realistic example.
> ========================
> gvim -U NONE -u NONE

Only last time, although I don't think it matters in this
example, you are working in 'cp' mode.  Many of vim/gvim
features will not work in that mode.  (Also, the -U NONE is
redundant.  See ':h -u' second paragraph for why you don't
need -U and the side effect of setting 'cp')

> Let's suppose that  I am a poor pascal programmer and typing code like this:
> :set completeopt+=longest
> :set complete-=t
> i
> var one : byte;
>  two : byte;
>  two_and_three : byte;
>  three : byte; 
> // may be this is a word?
> one:=three;
> // or next one is a a word?
> one:=two_and_three;
> o<C-N>:=t<C-n>
> // completion in second <C-N> still not working here...
> // so there is no word? not 'one:=t*' or 't*' words in buffer?
> // I still thinks it should be considered as a bug.

What action did you take on the first <C-N>?  Since 'o' is
the longest common, no addition completion is done.  If you
just want the 'o' type <C-Y>, if you want 'one' type <C-N>,
or if you want 'or' type <C-P>.

Why <C-Y>?  See ':h complete_CTRL-Y'

Now type ':=t<C-N>'.  What do you mean by "still not
working"?

I see (since I picked 'one' for the first completion):

    one:=t
         two
         two_and_three
         three
         this

Nothing was added to the 't' because it's the longest
common.

If I now want 'this;' I would type '<C-P>;'.

My complete keystrokes from insert mode at the beginning of
that line are:

    o<C-N><C-N>:=t<C-N><C-P>;<Esc>

and my line reads:

    one:=this;

and my cursor would be on the ';'.

-- 
Best regards,
Bill

Reply via email to