1

:set completeopt=menuone does not always show the menu. For example pressing :vs<tab> on the command line one would expect the menu to appear, with the singular option vsplit. What happens instead is vsplit is imediately completed. How can I prevent this, and instead always show the menu even with only one valid completion?

2
  • 1
    Welcome to Vi and Vim! We need more context, where are you using vs<tab>, on a script you're editing of type Vim? If so, are you using some plug-ins to enable and implement type completion? Or is it on the Vim command-line, like :vs<tab> to complete the Ex command you're typing, to have Vim execute it? Please edit the question to clarify the context where this completion is executed. – filbranden Sep 10 '20 at 0:39
  • 1
    My bad! I've updated the question to reflect that this is a problem on the command line. – Dov Alperin Sep 10 '20 at 2:02
0

The 'completeopt' option only applies to Insert mode completion, which is not really the case when you're completing an Ex command on the Vim command-line.

The completion menu on the Vim command-line is enabled by 'wildmenu' and controlled with the 'wildmode' option.

But the 'wildmode' option doesn't support any setting that will display the completion menu when there's a single candidate for completion. From :help 'wildmode':

When there is only a single match, it is fully completed in all cases.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.