Autorefresh NERDTree
Putting everything together, something like this would do:
autocmd BufWritePost * NERDTreeFocus | execute 'normal R' | wincmd p
You can add additional autocmd events. However, be aware that above doesn't handle the case when you're currently already in the NERDTree window (but this could be handled with a conditional on &filetype ==# 'nerdtree'
). Then, this would also work on events such as CursorHold
.