:set completeopt=menuone does not always show menu on the commandline

Sep 10 2020

: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?

Respuestas

filbranden Sep 10 2020 at 09:13

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.

Pero la 'wildmode'opción no admite ninguna configuración que muestre el menú de finalización cuando hay un solo candidato para completar. De :help 'wildmode':

Cuando solo hay una coincidencia, se completa por completo en todos los casos.