[vim/vim] Port the Neovim popup menu support for command-line completion (PR #9707)

278 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Feb 6, 2022, 10:14:41 PM2/6/22
to vim/vim, Subscribed

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/9707

Commit Summary

  • a373dab Port the Neovim popupmenu support for command-line completion

File Changes

(8 files)

Patch Links:


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707@github.com>

codecov[bot]

unread,
Feb 6, 2022, 10:22:19 PM2/6/22
to vim/vim, Subscribed

Codecov Report

Merging #9707 (a373dab) into master (8cbf249) will decrease coverage by 1.87%.
The diff coverage is 30.00%.

Impacted file tree graph

@@            Coverage Diff             @@

##           master    #9707      +/-   ##

==========================================

- Coverage   82.40%   80.53%   -1.88%     

==========================================

  Files         154      152       -2     

  Lines      171664   173342    +1678     

  Branches    39322    39334      +12     

==========================================

- Hits       141466   139593    -1873     

- Misses      17043    20983    +3940     

+ Partials    13155    12766     -389     
Flag Coverage Δ
huge-clang-none 81.99% <30.00%> (?)
huge-gcc-none ?
huge-gcc-unittests 2.02% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/drawscreen.c 78.72% <0.00%> (+0.25%) ⬆️
src/optionstr.c 89.52% <ø> (-0.78%) ⬇️
src/popupmenu.c 77.85% <20.00%> (-0.83%) ⬇️
src/cmdexpand.c 78.86% <26.47%> (-5.53%) ⬇️
src/ex_getln.c 82.44% <55.55%> (-2.29%) ⬇️
src/libvterm/src/rect.h 0.00% <0.00%> (-96.78%) ⬇️
src/libvterm/src/state.c 34.86% <0.00%> (-54.44%) ⬇️
src/libvterm/src/keyboard.c 36.84% <0.00%> (-50.79%) ⬇️
src/libvterm/include/vterm.h 0.00% <0.00%> (-44.45%) ⬇️
src/libvterm/src/parser.c 55.41% <0.00%> (-40.42%) ⬇️
... and 140 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8cbf249...a373dab. Read the comment docs.


Reply to this email directly, view it on GitHub, or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/c1031033381@github.com>

Yegappan Lakshmanan

unread,
Feb 7, 2022, 12:00:32 AM2/7/22
to vim/vim, Push

@yegappan pushed 1 commit.


View it on GitHub.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/push/9026751493@github.com>

Yegappan Lakshmanan

unread,
Feb 7, 2022, 12:08:33 AM2/7/22
to vim/vim, Push

@yegappan pushed 1 commit.


View it on GitHub.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/push/9026790040@github.com>

Yegappan Lakshmanan

unread,
Feb 7, 2022, 12:38:51 AM2/7/22
to vim/vim, Push

@yegappan pushed 1 commit.


View it on GitHub.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/push/9026931095@github.com>

Bram Moolenaar

unread,
Feb 7, 2022, 6:40:37 AM2/7/22
to vim/vim, Subscribed

Thanks for working on this. The number of changes is smaller than what I expected.

The navigation with CTRL-N and CTRL-P also works, which is the most natural for me. This should be mentioned somewhere.

The navigation with cursor keys is weird. Up and Down should really select the next/previous entry. Left and Right can be used for what they used to do, thus swap them.

It appears the menu is not positioned properly. E.g. ":e proto/" shows the menu too far left. With ":e proto/p it's off by one character. Can we align it with the text in the command line? It won't always fit, but should work in most cases.

When there are many matches there is a scrollbar, trying to use the mouse scrolls the whole window. Perhaps actual scrolling the menu isn't implemented, but it should probably disable the mouse scrolling.

Would be good to have a couple of screenshot tests, especially for the positioning.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/c1031372833@github.com>

Dominique Pellé

unread,
Feb 7, 2022, 7:34:43 AM2/7/22
to vim/vim, Subscribed

@dpelle commented on this pull request.


In src/cmdexpand.c:

> @@ -553,6 +604,28 @@ showmatches(expand_T *xp, int wildmenu UNUSED)
 	showtail = cmd_showtail;
     }
 
+#ifdef FEAT_WILDMENU
+    if (wildmenu && STRCMP(p_wop, "pum") == 0)
+    {
+	char_u *endpos;
+
+	compl_match_arraysize = num_files;
+	compl_match_array = ALLOC_MULT(pumitem_T, compl_match_arraysize);
+	for (i = 0; i < num_files; i++)
+	{
+	    compl_match_array[i].pum_text = L_SHOWFILE(i);
+	    compl_match_array[i].pum_info = NULL;
+	    compl_match_array[i].pum_extra = NULL;
+	    compl_match_array[i].pum_kind = NULL;
+	}
+	endpos = (showtail ? sm_gettail(xp->xp_pattern) : xp->xp_pattern);

(nitpicky) the parentheses are not useful here.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/review/874602757@github.com>

bfrg

unread,
Feb 7, 2022, 8:33:41 AM2/7/22
to vim/vim, Subscribed

It doesn't work with set wildoptions=pum,tagfile or set wildoptions=tagfile,pum.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/c1031474567@github.com>

Yegappan Lakshmanan

unread,
Feb 7, 2022, 10:47:07 AM2/7/22
to vim/vim, Push

@yegappan pushed 1 commit.

  • 5d03763 Properly position the cmdline popup menu. Swap the Left/Up and Right/Down keys. Correctly check the wildoptions settings.


View it on GitHub.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/push/9031792188@github.com>

Yegappan Lakshmanan

unread,
Feb 7, 2022, 10:47:56 AM2/7/22
to vim/vim, Push

@yegappan pushed 2 commits.

  • 0a86f8a Port the Neovim popupmenu support for command-line completion
  • 746f7a6 Properly position the cmdline popup menu. Swap the Left/Up and Right/Down keys. Correctly check the wildoptions settings.


View it on GitHub.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/push/9031800309@github.com>

Yegappan Lakshmanan

unread,
Feb 7, 2022, 11:07:47 AM2/7/22
to vim/vim, Push

@yegappan pushed 1 commit.


View it on GitHub.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/push/9031994725@github.com>

Yegappan Lakshmanan

unread,
Feb 7, 2022, 11:13:56 AM2/7/22
to vim/vim, Subscribed

It doesn't work with set wildoptions=pum,tagfile or set wildoptions=tagfile,pum.

This is addressed by the latest commit.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/c1031646275@github.com>

Yegappan Lakshmanan

unread,
Feb 7, 2022, 11:14:13 AM2/7/22
to vim/vim, Subscribed

@yegappan commented on this pull request.


In src/cmdexpand.c:

> @@ -553,6 +604,28 @@ showmatches(expand_T *xp, int wildmenu UNUSED)
 	showtail = cmd_showtail;
     }
 
+#ifdef FEAT_WILDMENU
+    if (wildmenu && STRCMP(p_wop, "pum") == 0)
+    {
+	char_u *endpos;
+
+	compl_match_arraysize = num_files;
+	compl_match_array = ALLOC_MULT(pumitem_T, compl_match_arraysize);
+	for (i = 0; i < num_files; i++)
+	{
+	    compl_match_array[i].pum_text = L_SHOWFILE(i);
+	    compl_match_array[i].pum_info = NULL;
+	    compl_match_array[i].pum_extra = NULL;
+	    compl_match_array[i].pum_kind = NULL;
+	}
+	endpos = (showtail ? sm_gettail(xp->xp_pattern) : xp->xp_pattern);

Thanks. This is addressed.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/review/874917167@github.com>

Yegappan Lakshmanan

unread,
Feb 7, 2022, 11:16:49 AM2/7/22
to vim/vim, Subscribed

The navigation with CTRL-N and CTRL-P also works, which is the most natural for me. This should be mentioned somewhere.

Updated the help text to mention these keys.

The navigation with cursor keys is weird. Up and Down should really select the next/previous entry. Left and Right can
be used for what they used to do, thus swap them.

I have swapped these keys now. Hopefully this doesn't cause new issues.

It appears the menu is not positioned properly. E.g. ":e proto/" shows the menu too far left. With ":e proto/p it's off by
one character. Can we align it with the text in the command line? It won't always fit, but should work in most cases.

Changed the popup menu position to the end of the cmd line. I am not sure whether this works in all the cases.

When there are many matches there is a scrollbar, trying to use the mouse scrolls the whole window. Perhaps actual
scrolling the menu isn't implemented, but it should probably disable the mouse scrolling.

Need to look into this.

Would be good to have a couple of screenshot tests, especially for the positioning.

Yes. I will add some screen shot tests.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/c1031649726@github.com>

Yegappan Lakshmanan

unread,
Feb 7, 2022, 11:18:35 AM2/7/22
to vim/vim, Push

@yegappan pushed 1 commit.


View it on GitHub.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/push/9032099449@github.com>

Yegappan Lakshmanan

unread,
Feb 7, 2022, 9:43:44 PM2/7/22
to vim/vim, Push

@yegappan pushed 1 commit.

  • d0cb719 Add screendump tests for command-line popup menu and fix a few problems.


View it on GitHub.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/push/9036320833@github.com>

Yegappan Lakshmanan

unread,
Feb 7, 2022, 9:44:22 PM2/7/22
to vim/vim, Push

@yegappan pushed 3 commits.

  • 79e69ba Port the Neovim popupmenu support for command-line completion
  • cb11456 Fix test failure
  • a1209f5 Add screendump tests for command-line popup menu and fix a few problems.


View it on GitHub.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/push/9036322775@github.com>

bfrg

unread,
Feb 7, 2022, 11:13:14 PM2/7/22
to vim/vim, Subscribed

When I press :e <tab> in command-line mode, the popup menu opens as expected, but after pressing <c-e> to cancel the pum, followed by <up>, Vim will insert ../ into the command-line, open the popup menu and select the first entry. This is unexpected. <up> and <down> keys should just navigate through the command-line history and not open the popup menu.

Is the pum aligned correctly in this screenshot? It seems to be off by 2 characters.
screenshot-2022-02-08_050536


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/c1032195592@github.com>

Yegappan Lakshmanan

unread,
Feb 8, 2022, 12:06:31 AM2/8/22
to vim/vim, Push

@yegappan pushed 1 commit.

  • ffd359a After canceling the popup menu using <C-E>, pressing <Up> brings the popup menu again


View it on GitHub.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/push/9037020028@github.com>

Yegappan Lakshmanan

unread,
Feb 8, 2022, 12:08:06 AM2/8/22
to vim_dev, reply+ACY5DGFC6QHRAC4AVI...@reply.github.com, vim/vim, Subscribed
Hi,

On Mon, Feb 7, 2022 at 8:13 PM bfrg <vim-dev...@256bit.org> wrote:

When I press :e <tab> in command-line mode, the popup menu opens as expected, but after pressing <c-e> to cancel the pum, followed by <up>, Vim will insert ../ into the command-line, open the popup menu and select the first entry. This is unexpected. <up> and <down> keys should just navigate through the command-line history and not open the popup menu.


Thanks for trying out the patch and reporting this issue. I have updated the PR to fix this issue.
Can you try out the updated PR?
 

Is the pum aligned correctly in this screenshot? It seems to be off by 2 characters.
screenshot-2022-02-08_050536


I think you typed "cN" and then pressed <Tab> to display the popup menu. In that case, the popup menu
is correctly aligned. The popup menu uses the last column in the cmd line where you invoked the completion.

Regards,
Yegappan

vim-dev ML

unread,
Feb 8, 2022, 12:08:23 AM2/8/22
to vim/vim, vim-dev ML, Your activity

Hi,


On Mon, Feb 7, 2022 at 8:13 PM bfrg ***@***.***> wrote:

> When I press :e <tab> in command-line mode, the popup menu opens as
> expected, but after pressing <c-e> to cancel the pum, followed by <up>,
> Vim will insert ../ into the command-line, open the popup menu and select
> the first entry. This is unexpected. <up> and <down> keys should just
> navigate through the command-line history and not open the popup menu.
>

Thanks for trying out the patch and reporting this issue. I have updated
the PR to fix this issue.
Can you try out the updated PR?


> Is the pum aligned correctly in this screenshot? It seems to be off by 2
> characters.
> [image: screenshot-2022-02-08_050536]
> <https://user-images.githubusercontent.com/6266600/152916289-04353212-5d46-4684-97f7-f4d3abc460ab.png>

>
>
> I think you typed "cN" and then pressed <Tab> to display the popup menu.
In that case, the popup menu
is correctly aligned. The popup menu uses the last column in the cmd line
where you invoked the completion.

Regards,
Yegappan


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/c1032219472@github.com>

Ben Jackson

unread,
Feb 8, 2022, 4:44:43 AM2/8/22
to vim/vim, vim-dev ML, Comment

What does pumvisible() return when this popup is displayed? I'm thinking that a lot of uses have mappings for <Tab> that look like inoremap <expr> <Tab> pumvisible() ? '<C-n>' : '<Tab>'. I can imagine a use case for that as a command line mapping too (i.e. to make Tab work like Ctrl-n when the menu is visible). WDYT?


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032408561@github.com>

Bram Moolenaar

unread,
Feb 8, 2022, 6:12:28 AM2/8/22
to vim/vim, vim-dev ML, Comment

Let me include this now, so users can try it out. I expect there will be some improvements later.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032491014@github.com>

Bram Moolenaar

unread,
Feb 8, 2022, 6:47:50 AM2/8/22
to vim/vim, vim-dev ML, Comment

I'll fix the horizontal positioning.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032521211@github.com>

Bram Moolenaar

unread,
Feb 8, 2022, 7:08:40 AM2/8/22
to vim/vim, vim-dev ML, Comment

Closed #9707 via 3908ef5.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/issue_event/6026287535@github.com>

bfrg

unread,
Feb 8, 2022, 8:48:22 AM2/8/22
to vim/vim, vim-dev ML, Comment

@puremourning <tab> already works out of the box, pumvisible() too. The only difference I found is that <up> and <down> keys select the previous and next entry, respectively, and insert it similar to <c-p> and <c-n>. This is different from insert-mode completion where <up> and <down> will navigate through the menu without inserting the entry.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032628445@github.com>

Ben Jackson

unread,
Feb 8, 2022, 8:50:50 AM2/8/22
to vim/vim, vim-dev ML, Comment

and will navigate through the menu without inserting the entry.

Only if completeopt contains noinsert right?


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032630794@github.com>

Maxim Kim

unread,
Feb 8, 2022, 8:56:28 AM2/8/22
to vim/vim, vim-dev ML, Comment

Looks nice, although, I was expecting it would work for all cmdline completions, e.g. :b <tab>


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032636213@github.com>

Maxim Kim

unread,
Feb 8, 2022, 8:58:35 AM2/8/22
to vim/vim, vim-dev ML, Comment

Huh, I take my words back, it works for everything, indeed. For buffers I tried the old vim.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032638259@github.com>

Shane-XB-Qian

unread,
Feb 8, 2022, 8:59:18 AM2/8/22
to vim/vim, vim-dev ML, Comment

Only if completeopt contains noinsert right?

those opt options looks not worked here.
it's more like wildmenu, but just showing at 'popup menu' vs 'stl'.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032638911@github.com>

bfrg

unread,
Feb 8, 2022, 9:14:06 AM2/8/22
to vim/vim, vim-dev ML, Comment

@puremourning <up> and <down> never insert anything, they just select the previous or next entries in the menu. This is explained under :h popupmenu-keys.

Like @Shane-XB-Qian said, the new pum option behaves exactly like wildmenu but using a popup menu instead of the statusline.

pumvisible() can be used. For example, the following works:

cnoremap <expr> <enter> pumvisible() ? '<c-y>' : '<enter>'
cnoremap <expr> <esc>   pumvisible() ? '<c-e>' : '<esc>'


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032653848@github.com>

bfrg

unread,
Feb 8, 2022, 9:24:16 AM2/8/22
to vim/vim, vim-dev ML, Comment

Hmm, It seems the second mappings doesn't work after all:

cnoremap <expr> <esc> pumvisible() ? '<c-e>' : '<esc>'


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032664631@github.com>

Shane-XB-Qian

unread,
Feb 8, 2022, 10:00:34 AM2/8/22
to vim/vim, vim-dev ML, Comment

no, it worked.
// but wildmode=list,full not supported, and wildignorecase not worked for all case ignore, and wildmenumode() seems might be wrong.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032703246@github.com>

Shane-XB-Qian

unread,
Feb 8, 2022, 10:02:59 AM2/8/22
to vim/vim, vim-dev ML, Comment

no, looks it worked.
// but wildmode=list,full not supported, and wildignorecase not worked for all cmd, and wildmenumode() seems might be wrong.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032705845@github.com>

Wang Shidong

unread,
Feb 8, 2022, 10:38:31 AM2/8/22
to vim/vim, vim-dev ML, Comment

Nice work, but How to deal with copyright issues? Neovim contributions since b17d96 are licensed under the Apache 2.0 license.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032744988@github.com>

Yegappan Lakshmanan

unread,
Feb 8, 2022, 10:57:35 AM2/8/22
to vim_dev, reply+ACY5DGD3O6QRTBQ4PM...@reply.github.com, vim/vim, vim-dev ML, Comment
Hi,

On Tue, Feb 8, 2022 at 7:38 AM Wang Shidong <vim-dev...@256bit.org> wrote:

Nice work, but How to deal with copyright issues? Neovim contributions since b17d96 are licensed under the Apache 2.0 license.



The changes to support the command-line popup menu are made to the core Vim 
command line completion code that Neovim uses from Vim. So I think that the Vim
license covers these changes. But I am not a lawyer, so I don't know all the nuances
with the license.

Regards,
Yegappan

vim-dev ML

unread,
Feb 8, 2022, 10:57:54 AM2/8/22
to vim/vim, vim-dev ML, Your activity

Hi,

On Tue, Feb 8, 2022 at 7:38 AM Wang Shidong ***@***.***>

wrote:

> Nice work, but How to deal with copyright issues? Neovim contributions
> since b17d96
> <https://github.com/neovim/neovim/commit/b17d9691a24099c9210289f16afb1a498a89d803>

> are licensed under the Apache 2.0 license.
>
>
>
The changes to support the command-line popup menu are made to the core Vim
command line completion code that Neovim uses from Vim. So I think that the
Vim
license covers these changes. But I am not a lawyer, so I don't know all
the nuances
with the license.

Regards,
Yegappan


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/c1032766094@github.com>

Dominique Pellé

unread,
Feb 8, 2022, 11:02:02 AM2/8/22
to vim/vim, vim-dev ML, Comment

Using vim-8.2.4327, I get the pum completion on Ex line to work with:

vim --clean -c 'set wildoptions=pum'

It's very nice BTW. However, it does not work with:

vim --clean -c 'set wildoptions=pum wildmode=longest,list'

Any reason for pum completion to not work in that case?


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032770511@github.com>

Yegappan Lakshmanan

unread,
Feb 8, 2022, 11:10:56 AM2/8/22
to vim_dev, reply+ACY5DGB3NUOQYNWOUH...@reply.github.com, vim/vim, vim-dev ML, Comment
Hi,

On Tue, Feb 8, 2022 at 8:02 AM Dominique Pellé <vim-dev...@256bit.org> wrote:

Using vim-8.2.4327, I get the pum completion on Ex line to work with:

vim --clean -c 'set wildoptions=pum'

It's very nice BTW. However, it does not work with:

vim --clean -c 'set wildoptions=pum wildmode=longest,list'

Any reason for pum completion to not work in that case?


Yes. Using the 'list' value in 'wildmode' should list all the matches but not
use the wildmenu. As the help for 'wildmode' describes, if you use
"longest,full" or "longest:full", then it should open the wild menu.

Regards,
Yegappan

 

vim-dev ML

unread,
Feb 8, 2022, 11:11:13 AM2/8/22
to vim/vim, vim-dev ML, Your activity

Hi,

On Tue, Feb 8, 2022 at 8:02 AM Dominique Pellé ***@***.***>

wrote:

> Using vim-8.2.4327, I get the pum completion on Ex line to work with:
>
> vim --clean -c 'set wildoptions=pum'
>
> It's very nice BTW. However, it does not work with:
>
> vim --clean -c 'set wildoptions=pum wildmode=longest,list'
>
> Any reason for pum completion to not work in that case?
>
>
> Yes. Using the 'list' value in 'wildmode' should list all the matches but
not
use the wildmenu. As the help for 'wildmode' describes, if you use
"longest,full" or "longest:full", then it should open the wild menu.

Regards,
Yegappan


Reply to this email directly, view it on GitHub, or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9707/c1032793462@github.com>

Shane-XB-Qian

unread,
Feb 8, 2022, 11:11:59 AM2/8/22
to vim/vim, vim-dev ML, Comment

> How to deal with copyright issues? Neovim contributions since b17d96<https://github.com/neovim/neovim/commit/b17d9691a24099c9210289f16afb1a498a89d803>are licensed under the Apache 2.0 license.


what's your point? is there any commercial code or brand issue or paper?


neovim looks porting vim patches everyday.


Reply to this email directly, view it on GitHub.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032794349@github.com>

bfredl

unread,
Feb 8, 2022, 11:13:59 AM2/8/22
to vim/vim, vim-dev ML, Comment

@wsdjeg as the main author of the neovim implementation, I have previously stated that inclusion in vim under the vim license is okay.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032796585@github.com>

Shane-XB-Qian

unread,
Feb 8, 2022, 11:21:05 AM2/8/22
to vim/vim, vim-dev ML, Comment

> Any reason for pum completion to not work in that case?


seems coz `wildmenu` didn't support others but `full`, so this/pum same. :-)

// but i wish it can be working like `noinsert` option.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032804236@github.com>

Dominique Pellé

unread,
Feb 8, 2022, 11:25:38 AM2/8/22
to vim/vim, vim-dev ML, Comment

Using this command, I see a regression:

vim --clean -c 'set wildoptions= wildmode=longest,list'

Then press for example :c<tab>s and notice that the screen is cleared when pressing s.
I don't see this bug prior at 8.2.4324. The bug started to appear at 8.2.4325.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032809324@github.com>

Dominique Pellé

unread,
Feb 8, 2022, 11:50:35 AM2/8/22
to vim/vim, vim-dev ML, Comment

However, it does not work with:

vim --clean -c 'set wildoptions=pum wildmode=longest,list'

Any reason for pum completion to not work in that case?

Yes. Using the 'list' value in 'wildmode' should list all the matches but


not use the wildmenu. As the help for 'wildmode' describes, if you use
"longest,full" or "longest:full", then it should open the wild menu.

I think it could be made to work with the pum though. Maybe I'm missing
something, but when using the pum and I pressing :ar I would like it to
complete to :arg (as all completions start with :arg) on the Ex line and
show the pum with no item selected in the pum as it did not fully complete.

I also wonder, is there a way to always show the pum as I type an Ex
command without pressing ?


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032835792@github.com>

Bram Moolenaar

unread,
Feb 8, 2022, 12:41:47 PM2/8/22
to vim/vim, vim-dev ML, Comment


> Using this command, I see a regression:
> ```
> vim --clean -c 'set wildoptions= wildmode=longest,list'
> ```
> Then press for example `:c<tab>s` and notice that the screen is
> cleared when pressing `s`. I don't see this bug prior at 8.2.4324.

> The bug started to appear at 8.2.4325.

I'll fix that.

--
"Making it up? Why should I want to make anything up? Life's bad enough
as it is without wanting to invent any more of it."
-- Marvin, the Paranoid Android in Douglas Adams'
"The Hitchhiker's Guide to the Galaxy"

/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1032885780@github.com>

Yegappan Lakshmanan

unread,
Feb 9, 2022, 12:32:08 AM2/9/22
to vim/vim, vim-dev ML, Comment

However, it does not work with:
vim --clean -c 'set wildoptions=pum wildmode=longest,list'
Any reason for pum completion to not work in that case?

Yes. Using the 'list' value in 'wildmode' should list all the matches but
not use the wildmenu. As the help for 'wildmode' describes, if you use
"longest,full" or "longest:full", then it should open the wild menu.

I think it could be made to work with the pum though. Maybe I'm missing something, but when using the pum and I pressing :ar<tab> I would like it to complete to :arg (as all completions start with :arg) on the Ex line and show the pum with no item selected in the pum as it did not fully complete.

We can support this but this will need some work. I will look into this later.

I also wonder, is there a way to always show the pum as I type an Ex command without pressing ?

This will need quite a bit of work (to make it work like the insert-mode completion popup).


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1033368134@github.com>

Wang Shidong

unread,
Apr 4, 2022, 4:43:00 AM4/4/22
to vim/vim, vim-dev ML, Comment

@wsdjeg as the main author of the neovim implementation, I have previously stated that inclusion in vim under the vim license is okay.

Ok, thank you. Reference at least should be mentioned in the Commit Message.


Reply to this email directly, view it on GitHub.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1087279488@github.com>

Shane-XB-Qian

unread,
Apr 4, 2022, 11:46:46 AM4/4/22
to vim/vim, vim-dev ML, Comment

@wsdjeg the reference is in this ticket description already, and implement logic looks based on vim core and vim wild menu.
it is just about upstream and fork.
// and BTW: what's related to your biz?

--
shane.xb.qian


Reply to this email directly, view it on GitHub.

You are receiving this because you commented.Message ID: <vim/vim/pull/9707/c1087721490@github.com>

Reply all
Reply to author
Forward
0 new messages