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

1 Answer 1


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

  • 1
    i 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
    Apr 26, 2011 at 22:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .