Accept selected match and stop completion
Ctrl-y (wildmenu)
Example
Command-line 0 / 1Command-line 1 / 1Accept selected match and stop completion.
Command line
- Typed text
:edit alpha.txt- Insertion offset
15
Active completion
- Configuration
wildmenu, wildmode=full, wildoptions= (no pum)- Original
:edit al- Selected
alpha.txt- Candidates
alpha.txt alpine.txt
Ctrl-y accepts alpha.txt and ends completion; the command has not run.
Command line
- Typed text
:edit alpha.txt- Insertion offset
15
Completion state
- Configuration
wildmenu, wildmode=full, wildoptions= (no pum)- Completion
inactive
Before & after
Before
Command line
- Typed text
:edit alpha.txt- Insertion offset
15
Active completion
- Configuration
wildmenu, wildmode=full, wildoptions= (no pum)- Original
:edit al- Selected
alpha.txt- Candidates
alpha.txt alpine.txt
After
Command line
- Typed text
:edit alpha.txt- Insertion offset
15
Completion state
- Configuration
wildmenu, wildmode=full, wildoptions= (no pum)- Completion
inactive
Documentation-backed illustration. the displayed completion candidates and selection are prepared; 'wildmenu' documents this key's special meaning. Ctrl-y accepts alpha.txt and ends completion; the command has not run. Primary help: 'wildmenu'.
alpha
beta
gammaCursor on line 1, column 1Details & Vim help
Accept selected match and stop completion. Context: commands in wildmenu mode (see 'wildmenu'). Parenthesized context labels in the displayed keys are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.