vimtricks.wiki Concise Vim tricks, one at a time.

How do I make Vim's command-line tab completion appear in a popup menu instead of the status bar?

Answer

:set wildoptions=pum

Explanation

The wildoptions=pum setting makes the wildmenu (command-line tab completion) render as a floating popup menu instead of expanding along the bottom status bar. The popup shows more candidates at once, is easier to scroll through, and shares the same visual style as insert-mode completion — giving the whole editor a consistent completion UI.

How it works

With the default wildmenu, pressing <Tab> on the command line shows matches in the statusline. With pum, a vertical popup appears above the command line:

set wildmenu          " enable wildmenu
set wildoptions=pum   " use popup menu style

You can scroll the popup with <C-n> / <C-p> or the arrow keys, and dismiss it with <Esc>.

Example

With wildoptions=pum:

:e src/comp<Tab>

  ┌────────────────────┐
  │ components/        │
  │ compiler/          │
  │ compat.go          │
  └────────────────────┘
:e src/comp

Without it, the matches appear on a single horizontal line in the status area, limiting how many are visible at once.

Tips

  • Combine with set pumheight=15 to limit the number of visible rows in the popup
  • The fuzzy value can be added alongside: set wildoptions=pum,fuzzy enables fuzzy matching for completions (Neovim only)
  • This option is available in Neovim and Vim 9+; older Vim versions will silently ignore the pum value
  • set wildmode=longest:full,full is a good companion to show the longest match first, then cycle

Next

How do I keep the cursor position synchronized across multiple Vim windows?