nerdtree and current directory

7

1

How can I achieve this situation?

  1. Open vim in my home folder.
  2. Navigate somewhere with NERDTree
  3. Run the :!ls command and see the contents of the directory in that NERDTree is displaying

nkint

Posted 2011-04-26T20:39:15.867

Reputation: 569

Answers

11

Try :help NERDTreeChDirMode. Setting it to 2 will do what you want.

romainl

Posted 2011-04-26T20:39:15.867

Reputation: 19 227

1i got it thanks! but to be complete (i'm not a vim guru) the answer will include also ":helptags ~/.vim/doc" to get docs aviable and "let g:NERDTreeChDirMode=2" in .vimrc – nkint – 2011-04-26T22:29:48.450