I want to have fixed current directory equals to the directory where vim was opened.
Note I am using tabs and splits, so I want to have the same current directory in all tabs and splits. How can I do that?
I want to have fixed current directory equals to the directory where vim was opened.
Note I am using tabs and splits, so I want to have the same current directory in all tabs and splits. How can I do that?
To change the current directory with the file opened at start up you can add this to your vimrc:
cd %:h
By default vim doesn't change the current directory when opening other files so your tabs and splits should not change.
Note that you might be interested by :h current-directory