You can use the
:find command to locate a file by name and open it for editing.
:find will search for the file in the directories listed in
'path', which by default includes the current directory. You can add more directories to
'path' that you want to look up, and you can use wildcards, including
** to traverse multiple subdirectories.
In particular, to find files recursively under the current tree, you can use:
NOTE: This can be very slow in trees with many subdirectories, so be careful with this setting. Prefer to specify narrower subsets of the tree, where to locate files you're searching for.
You can also take a look at
:help file-searching for more details on the kinds of expressions available to use in
Second, you can specify extensions to add to the file names, using the
'suffixesadd' set, you can use a command such as
:find ui to open file
:find model to open
Note you always need to specify the full name of the file (except for the path and the extension.) If you wanted something that would handle incomplete filenames only, then consider plug-ins such as ctrlp.vim or fzf.vim to extend Vim with support for fuzzy finders.
You also asked about ignoring backup files. When you're completing filenames (for example, using Tab after a
:e), you can ignore files matching certain patterns by adding them to the
This will skip backup files when completing filenames on a
:e command line.