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

How do I list all possible completions for the current command-line entry in Vim?

Answer

<C-d> (in command mode)

Explanation

Pressing <C-d> in Vim's command line displays the full list of matching completions below the command prompt, without cycling through them one at a time. This gives you a bird's-eye view of your options before committing to a choice.

How it works

  • <Tab> — cycles through completions one by one, replacing the current entry with each candidate
  • <C-d> — lists all completions at once beneath the command line, leaving your typed text unchanged so you can keep narrowing it down

This is especially useful when you half-remember a command name, option, or file path and need to see what matches before deciding. The list disappears as soon as you continue typing or press <Esc>.

Example

Type :set no then press <C-d> to see every option that begins with no:

:set no
noautoindent  nobackup     nocindent    nocompatible noconfirm
noeol         noexpandtab  nohls        noignorecase nojoinspaces
...

You can then continue typing to narrow the list, or press <Tab> to start cycling through what's visible.

Tips

  • Works for commands, options (:set), filenames, register names, and more — anything Vim knows how to complete
  • Combine with :set wildmenu and :set wildmode=longest:list,full for an enhanced completion experience: first <Tab> completes to the longest common prefix, second <Tab> opens a menu
  • In file completion contexts (e.g., :e ) <C-d> respects :set wildignore, hiding files matched by ignored patterns
  • Use <C-a> in command mode to insert all matching completions directly into the command line at once

Next

How do I highlight only the line number of the current line without highlighting the entire line?