How do I change the current directory to the directory of the current
file? You can use the following command to change the current directory to the directory of the current file:
:cd %:p:h
To automatically change the current directory to the directory of the current file, simply set the option ‘autochdir’.
:set autochdir
Comments (1)
Pepsh Pepshinsky
Let’s see you to :help viminfo-file-name (option -i) :set viminfofile=NONE