In the :help cmdline-completion
section, see this paragraph discusses suffixes
*c_CTRL-D*
CTRL-D List names that match the pattern in front of the cursor.
When showing file names, directories are highlighted (see
'highlight' option). Names where 'suffixes' matches are moved
to the end.
The 'wildoptions' option can be set to "tagfile" to list the
file of matching tags.
Then jumping to the :help suffixes
page:
*'suffixes'* *'su'*
'suffixes' 'su' string (default ".bak,~,.o,.h,.info,.swp,.obj")
global
Files with these suffixes get a lower priority when multiple files
match a wildcard. See |suffixes|. Commas can be used to separate the
suffixes. Spaces after the comma are ignored. A dot is also seen as
the start of a suffix. To avoid a dot or comma being recognized as a
separator, precede it with a backslash (see |option-backslash| about
including spaces and backslashes).
Using this, you can include /
in the suffixes
option. You probably want to pre-pend this to the default option, using ^=
:set suffixes^=/
:set suffixes?
suffixes=/,.bak,~,.o,.h,.info,.swp,.obj
With the default setting for suffixes
, hitting <tab>
after :e
would show everything in alphabetical order:
:e
abc.vim bbb/ def.vim xyz.vim yo/ ze/
After pre-pending /
to the suffixes
setting, the directories show up last:
:e
abc.vim def.vim xyz.vim bbb/ yo/ ze/