When I open a new tab with different path from the previous file in VIM, NERDTree will still remains the same directory hierarchy of the previous file.
Is there a sync shortcut to change the current root directory to the new opened file's directory?
|
When I open a new tab with different path from the previous file in VIM, NERDTree will still remains the same directory hierarchy of the previous file. Is there a sync shortcut to change the current root directory to the new opened file's directory?
| |||
|
feedback
|
|
I'm not sure if there's a NERDTree-specific way to do that, but you can always configure Vim so that it sets the working directory to the current file's directory:
Now all what you have to do after opening a file in a new tab is | |||
|
feedback
|
|
I use the following mapping to view the current buffer in NERDTree:
| |||
|
feedback
|