Wiki

by yszheda

View project onGitHub

Tip 112: Work with the Autocomplete Pop-Up Menu

Return to the top: <<Practical Vim>>

Commands for the Pop-up Menu

Keystrokes Effect
<C-n> Use the next match from the word list (next match)
<C-p> Use the previous match from the word list (previous match)
<Down> Select the next match from the word list
<Up> Select the previous match from the word list
<C-y> Accept the currently selected match (yes)
<C-e> Revert to the originally typed text (exit from autocompletion)
<C-h> (and <BS>) Delete one character from current match
<C-l> Add one character from current match
{char} Stop completion and insert {char}

Browse the Word List Without Changing the Document

Select by <Up>/<Down>, and confirm by <CR> or <C-y>

Update the Document As You Scroll Through the Word List

<C-n>/<C-p> updates the document to use the selected word

Dismiss All Selections

<C-e>

Refine the Word List as You Type

  • <C-n><C-p>: live filtering on word auto-completion. (useful when the word list contains too many suggestions)
  • <C-x><C-o><C-p>: live filtering on omni auto-completion.
  • <C-x><C-f><C-p>: live filtering on filename auto-completion.