: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?
1 Answer
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.
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.