Vim Autocompletion
IMPORTANT: This content is over 1 year old, and may now be obsolete, irrelevant and/or no longer accurate.
Vim has some really handy features that aren’t immediately apparent.
Autocompleting file paths
One of these is the ability to autocomplete / navigate paths - type all of the following keys while holding Control
:
x
thenf
: bring up the first file or path foundn
: select the next entryp
: select the previous entry- Repeat
x
thenf
to recurse into the selected path - Press
w
to go back up a level
Autocompleting variables
You can also autocomplete a word that’s contained in the current file. This can be useful for method or variable autocompletion while programming.
To show a list of autocomplete options simply press Control + p
or Control + n
as with the file paths to select the previous or next match.