5

How do I refresh file tree in NERDTree ?

If I use:

:!touch SomeNewFile

It is not rendered in the tree.

2 Answers 2

13

The NERD tree quick help is accessible from the NERD tree window by typing ? There I read:

" Filesystem mappings~
...
" r: refresh cursor dir
" R: refresh current root

These should do what you ask.

1

I use a custom map to refresh NERDTree:

nmap <Leader>r :NERDTreeFocus<cr> \| R \| <c-w><c-p>

Once set, Leader + r will do this for you:

  • Switch to NERDTree
  • Refresh the Root Node
  • Switch back to the previous window

Note: My key map has a last step where it refreshes CtrlP after refreshing NERDTree

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.