[New feature][WIP] CLPUM(Command-line mode PopUp Menu) for Vim

151 views
Skip to first unread message

h_east

unread,
Dec 2, 2015, 8:58:12 AM12/2/15
to vim_dev
Hi Bram and Vimmer,

I am trying to add new feature to Vim.
It's CLPUM(Command-line mode PopUp Menu)

Implementation is complete. Now, I am debugging.

Please check following site.
http://h-east.github.io/vim/

Is this interesting?
I want to be included this to (next version of) Vim.

Thanks.
--
Best regards,
Hirohito Higashi (a.k.a h_east)

Christian Brabandt

unread,
Dec 2, 2015, 3:05:40 PM12/2/15
to vim_dev
Hi h_east!

On Mi, 02 Dez 2015, h_east wrote:

> Hi Bram and Vimmer,
>
> I am trying to add new feature to Vim.
> It's CLPUM(Command-line mode PopUp Menu)
>
> Implementation is complete. Now, I am debugging.
>
> Please check following site.
> http://h-east.github.io/vim/
>
> Is this interesting?
> I want to be included this to (next version of) Vim.

Very cool.

Best,
Christian
--
Wer Almosen gibt, gewöhnt sich daran, Geld und Gut nicht mehr zu
bewundern.
-- Johannes I. Chrysostomos

Random832

unread,
Dec 2, 2015, 5:09:43 PM12/2/15
to vim...@vim.org
On 2015-12-02, h_east <h.eas...@gmail.com> wrote:
> I am trying to add new feature to Vim.
> It's CLPUM(Command-line mode PopUp Menu)

Would this replace 'wildmenu'? Would it work with it, if someone
still prefers the single-line display?

h_east

unread,
Dec 2, 2015, 8:22:52 PM12/2/15
to vim_dev, vim...@vim.org, rand...@fastmail.com
Hi,

2015-12-3(Thu) 7:09:43 UTC+9 Random832:


> On 2015-12-02, h_east wrote:
> > I am trying to add new feature to Vim.
> > It's CLPUM(Command-line mode PopUp Menu)
>
> Would this replace 'wildmenu'? Would it work with it, if someone
> still prefers the single-line display?

Yes and No.
It can be switched by the 'clpum' option.

- When 'clpum' option is on.
- <TAB> key's behavior:
When not started CLPUM, conform to 'wildmenu' and 'wildmode'.
When started CLPUM, Use the next match. This match replaces the previous one.

- <C-D> key's behavior:
CLPUM is triggered.

- When 'clpum' option is off, Vim keeps the backward compatibility.
- <TAB> key's behavior:
Conform to 'wildmenu' and 'wildmode'.

- <C-D> key's behavior:
List names that match the pattern in front of the cursor.

Gary Johnson

unread,
Dec 2, 2015, 9:16:52 PM12/2/15
to vim_dev
With wildmode=longest,list, typing <TAB> gives me the same results
as typing <C-D>. Therefore I don't need <C-D> in command-line mode
and have mapped it to <Del> so that command-line editing is more
EMACS-like.

Will the behavior be similar with 'clpum' enabled? That is, to use
CLPUM do I need to be able to use <C-D> or can I just use <TAB> with
the same effect?

Regards,
Gary

Random832

unread,
Dec 2, 2015, 9:18:21 PM12/2/15
to vim...@vim.org
On 2015-12-03, h_east <h.eas...@gmail.com> wrote:
> Yes and No.
> It can be switched by the 'clpum' option.

It seems like two parallel ways of implementing essentially the same
functionality. I'm particularly interested in the custom completion
functionality (your clcomplete option), and if (or if not why not) it is
supported without CLPUM enabled. It seems like a different feature, one
which should work with the existing completion UI.

h_east

unread,
Dec 2, 2015, 10:08:31 PM12/2/15
to vim_dev, gary...@spocom.com
Hi Gary,

2015-12-3(Thu) 11:16:52 UTC+9 Gary Johnson:

I'll change to the following behavior.

- When 'clpum' option is on.

- <TAB> and <C-D> behavior:
When not started CLPUM, CLPUM is triggered.


When started CLPUM, Use the next match. This match replaces the previous one.

Thank you for your comments.

h_east

unread,
Dec 2, 2015, 10:12:26 PM12/2/15
to vim_dev, vim...@vim.org, rand...@fastmail.com
Hi Random832,

2015-12-3(Thu) 11:18:21 UTC+9 Random832:

Indeed!
I will try to support it.

Gary Johnson

unread,
Dec 2, 2015, 10:37:38 PM12/2/15
to vim_dev
Thank you!

Regards,
Gary

Bram Moolenaar

unread,
Dec 3, 2015, 8:56:17 AM12/3/15
to h_east, vim_dev

Hirohito Higashi wrote:

> Hi Bram and Vimmer,
>
> I am trying to add new feature to Vim.
> It's CLPUM(Command-line mode PopUp Menu)
>
> Implementation is complete. Now, I am debugging.
>
> Please check following site.
> http://h-east.github.io/vim/
>
> Is this interesting?
> I want to be included this to (next version of) Vim.

We currently have the 'wildmenu' behavior. That works OK for a short
list of matches, when they are not too long. For long file names you
only see one at a time, which is not useful.

Using a menu can make this better. In your screenshots it seems it only
works with 'cmdheight' set to 2, since it uses one line to show the
mode. Or will it fall back to not showing the mode when 'cmdheight' is
one?

I don't think the completion itself should be different from 'wildmenu',
only the way the results are displayed.

--
hundred-and-one symptoms of being an internet addict:
175. You send yourself e-mail before you go to bed to remind you
what to do when you wake up.

/// Bram Moolenaar -- Br...@Moolenaar.net -- 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 ///

h_east

unread,
Dec 3, 2015, 10:06:55 AM12/3/15
to vim_dev, h.eas...@gmail.com
Hi Bram,

2015-12-3(Thu) 22:56:17 UTC+9 Bram Moolenaar:


> Hirohito Higashi wrote:
>
> > Hi Bram and Vimmer,
> >
> > I am trying to add new feature to Vim.
> > It's CLPUM(Command-line mode PopUp Menu)
> >
> > Implementation is complete. Now, I am debugging.
> >
> > Please check following site.
> > http://h-east.github.io/vim/
> >
> > Is this interesting?
> > I want to be included this to (next version of) Vim.
>
> We currently have the 'wildmenu' behavior. That works OK for a short
> list of matches, when they are not too long. For long file names you
> only see one at a time, which is not useful.
>
> Using a menu can make this better. In your screenshots it seems it only
> works with 'cmdheight' set to 2, since it uses one line to show the
> mode. Or will it fall back to not showing the mode when 'cmdheight' is
> one?

Yes. When 'cmdheight' is one, do not show the completion mode.
Is it better to show?

>
> I don't think the completion itself should be different from 'wildmenu',
> only the way the results are displayed.

Of course.
Content of completion is the same as 'wildmenu'.

Reply all
Reply to author
Forward
0 new messages