Christian Brabandt wrote:

> Bram,
> I am writing a test for the popupmenu and the different keys, that can 
> be used there (:h popupmenu-keys)

Thanks, that is useful.

> And I have some questions.
> 1)
> 
> ,----
> | In the first state these keys have a special meaning:
> | <BS> and CTRL-H   Delete one character, find the matches for the word before
> |               the cursor.  This reduces the list of matches, often to one
> |               entry, and switches to the second state.
> `----
> 
> I fail to understand what this does, especially in difference to the 
> second state:

For example, if you type "compl<Ctrl-N>" then you get a list of matches,
and the first one is used for the text.  That could be "completion".
Still the matches for "compl" are shown.
Then typing BS changes it to "completio" and only matches for that are
shown.

> ,----
> | In the second and third state these keys have a special meaning:
> | <BS> and CTRL-H   Delete one character, find the matches for the shorter 
> word
> |               before the cursor.  This may find more matches.
> `----
> 
> And whatever I do, using <bs> will always end the completion menu and 
> remove one character. Either from the last typed char or from the 
> inserted char. I can't seem to figure out, how to use <bs> to adjust the 
> number of entries in the completion menu.

The main difference is that in the second state the highlighted item
differs from what the current text is.

> 2) The behaviour of the enter key
> 
> ,----
> | The behavior of the <Enter> key depends on the state you are in:
> | first state:          Use the text as it is and insert a line break.
> | second state:         Insert the currently selected match.
> | third state:          Use the text as it is and insert a line break.
> `----
> 
> For me the <Enter> Key will always insert a line break.

Not for me.  Probably depends on 'completeopt'.  My value is
        menu,preview

> Any clarification would be appreciated.

It's possible that the help is not correct for all possible ways
completion works.  The code is very complicated and there are many
corner cases.

-- 
ARTHUR: Listen, old crone!  Unless you tell us where we can buy a shrubbery,
        my friend and I will ... we will say "Ni!"
CRONE:  Do your worst!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui