How to refresh in NERDTree plugin

Toress picture Toress · Dec 21, 2011 · Viewed 26.3k times · Source

When I open a file in vim with (Directory A in) NERDTree, it works well.

But if I open one more file in another directory (Directory B), it doesn't refresh to show the contents of directory B (While it still shows directory A).

Can NERDTree automatically refresh by itself?

Answer

John Smith picture John Smith · Oct 5, 2013

From https://gist.github.com/geekontheway/2667442 : just hit the r or R key to refresh the current tree. Could be mapped to auto refresh in .vimrc