Navigation file system in vim ->: find vs .: edit

When opening files in Vim, I almost always do something like this:

:e subDir/**/file<ctrl-d>

But in the docs and in the main every StackOverflow / blog post that I read, it seems like people are using the “find” method that I use “editing”.

What am I missing with the edit command instead of the find command?

+4
source share
1 answer

:editby default it is limited to the working directory: if you need to edit a file that is not under your working directory, you will need to specify its absolute path or the path relative to the working directory. In addition, you need to provide the necessary globes.

:find :edit, () , , path. path :find , :edit.

set path=,, , :e foo.

set path=** , :e **/foo, , - glob.

set path=.,** , .

set path=.,**,/path/to/some/central/vendor/directory ... ..

+5

Source: https://habr.com/ru/post/1609871/


All Articles