Reputation: 1386
How do I prevent NERDTree from changing the CWD when I open a file node?
I usually open a project folder with
cd apps/project
vim .
I want NERDTree's current working directory to be fixed with (apps/project) when i open a file node.
I tried :let NERDTreeChDirMode=0
, but it does not work.
Upvotes: 2
Views: 2506
Reputation: 133
The way to do this properly, on a new install, for example, is to set the g_spf13_no_autochdir
to 1, on .vimrc.before.local
(sets the toggle before all of spf13 is loaded)
echo let g:spf13_no_autochdir = 1 >> .vimrc.before.local
This will let you customize NERDTree behaviour without modifying spf13's config.
Upvotes: 1
Reputation: 31040
The let NERDTreeChDirMode=0
should be put in your ~/.vimrc.local for the spf13 vim plugin distribution, not executed after the fact. Also make sure that acd
or autochdir
is not in your ~/.vimrc.local.
Upvotes: 2