Show completions that match the pattern before the cursor
Example
Command-line 0 / 1Command-line 1 / 1Show completions that match the pattern before the cursor.
Command line
- Typed text
:edit al- Insertion offset
8
List both matching filenames above the unchanged :edit al command line.
Completion output
alpha.txt alpine.txt
Command line
- Typed text
:edit al- Insertion offset
8
Before & after
Before
Command line
- Typed text
:edit al- Insertion offset
8
After
Completion output
alpha.txt alpine.txt
Command line
- Typed text
:edit al- Insertion offset
8
Documentation-backed illustration. the current directory has only the two shown al matches, wildignore is empty, Ctrl-d is unmapped, wildchar is Tab, wildcharm is 0, and an 80-column, 24-row screen has cmdheight=4 with no active completion or pending messages. List both matching filenames above the unchanged :edit al command line. Primary help: c_CTRL-D.
alpha
beta
gammaCursor on line 1, column 1Details & Vim help
Show completions that match the pattern before the cursor. Use on an Ex command line at a position with completion. In a fresh / or ? search with the default completion keys, Vim inserts the Ctrl-d character. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.