When I type in the terminal something like
mvim ./path/to/my/project
Vim opens this project directory, in my NERDTree I can see the files, but when I try to run some CLI command, for example
:!touch some/file/in/my/project
It happens that my current path is the home directory of my users
so if I want to create a file in my project, I have to enter the full path, for example
:!touch ./path/to/my/project/some/file/in/my/project/name
Is it possible to somehow change the directory automatically after starting vim?
Stanislav Mekhonoshin
source share