How do I enable a popup menu for command-line tab completion in Neovim?
Answer
:set wildoptions=pum
Explanation
Setting wildoptions=pum tells Neovim to use its popup menu for command-line tab completion instead of the traditional horizontal wildmenu bar. The popup menu appears above the command line, is vertically scrollable, and stays out of the way of the file content — making it far more usable when you have many completions to browse.
How it works
pumstands for popup menu — the same floating window used for insert-mode completion.- When you type
:eand press<Tab>, Neovim opens a scrollable popup of file and directory matches instead of cycling through them one at a time or showing a cramped horizontal list. - Navigate the popup with
<Tab>/<S-Tab>,<C-n>/<C-p>, or arrow keys. Press<Enter>to confirm or<Esc>to dismiss. - You can combine values:
:set wildoptions=pum,tagfilealso shows the tag file path next to tag completions.
Example
With the default wildmenu, completing :b (switch buffer) shows:
buffers.txt config.lua init.lua
With wildoptions=pum, a floating popup appears with all open buffers listed vertically, filterable as you type more characters.
Tips
- Combine with
wildmenuandwildignorecasefor a full enhanced completion experience:
set wildmenu
set wildoptions=pum
set wildignorecase
- Set
pumblendto make the popup semi-transparent::set pumblend=15 - This option is Neovim-specific; stock Vim does not support
wildoptions=pum.