Tip 32: Tab-Complete Your Ex Commands
Return to the top: <<Practical Vim>>
-
<C-d>: reveal a list of possible completions. -
<Tab>: scroll forward -
<S-Tab>: scroll backward
Example:
References:
# If you open the file in vim, # then you can \"ayy@a the next line to execute the vim command: :h c_CTRL-D
Define tab-completion behavior
References:
# If you open the file in vim, # then you can \"ayy@a the next line to execute the vim command: :h :commmand-complete
Choosing from Multiple Matches
Custom the choosing behavior by tweaking the wilemode option:
-
Bash:
set wildmode=longest,list
-
Zsh:
set wildmenu set wilemode=full
wildmenu enables:
-
scroll forward:
<Tab>/<C-n>/<Right> -
scroll backward:
<S-Tab>/<C-p>/<left>