Hi Suresh,

I'm assuming you have:

set cot=menu,preview   by default.

  1) <UP> -- just doing 1 <UP> -- after i_CTRL-X s actually inserts
     an entry -- Bram says it will not, but it does in fact.

     Moreover, even though the message at the bottom says Bram's
     intent "Back at original", the word inserted is in fact the
     "match 1 of 100" word -- after exactly 1 <UP> after i_CTRL-X s.

Please let me clear the issues here first. To me we are discussing two
separate things:
   1) the omni completion feature itself
   2) the ways i_up-arrow and i_down-arrow "supposed" to work

When you test the omni features with "i_ctrl-p and i_ctrl-n", the
functions work exactly as Bram said in vim help. Simply try it
yourself. The omni completion works as it is defined.

But you are right when <up> / <down> arrows keys are used for omni.
Although it is selecting the words in the pop up menu, but it doesn't
insert the chosen word on the buffer window and therefore things don't
behave as expected.

IMHO, yes, as Gerald said, it is confirmed that there is a bug in
using i_up-arrow and i_down-arrow for omni features, but not the omni
function itself. I believe what Bram has defined in vim help holds
true. This brings up another question, are i_up-arrow and i_down-arrow
are expected to work as same as i_ctrl-p and i_ctrl-n since the
beginning? ^__^

  2) Then -- after doing zero or more <UP> and <DOWN> -- hitting
     <ESC> will leave that inserted "match 1 of 100" word in the
     buffer rather than Bram's intent of leaving the buffer unmodified.

i_ctrl-e leaves the word unmodified. I can't find any reference saying
that <esc> should do the same. In fact, I thought the function of
<esc> is simply quitting omni and insert modes, and therefore what has
inserted previously in the buffer remains....please correct me if I'm
wrong.

But I do find another separate issue. When I have:

        set cot=menu,preview,longest

1) i_ctrl-e doesn't restore the original word
2) after i_CTRL-X s the first chosen word is "Back at original", not
"match 1 of 100". (is it intented? because it behaves differently when
'cot' is set by default values)

I'm not sure about the second problem, but the first one seems to be a
bug to me clearly.

--
Ed

Reply via email to