How does vim automatically open its own project folder after startup?

  question, vim

In windows system, every time vim NREDTree is opened, the installation directory of vim is displayed, and the workspace is set manually, which is very troublesome.
Please comment from the great god.

I suggest you use vim-rooter as a plug-in. The principle of this plug-in is that when you open a file, it will search upward according to the absolute directory of the file until a matching file or directory is found and the directory is set as the current directory. …

For example, you can set.git/As a match, he will use the root directory of the git repository as the current directory. Similarly, many language development projects have feature files in the root directory and can be set to correspond.