5

How do I refresh file tree in NERDTree ?

If I use:

:!touch SomeNewFile

It is not rendered in the tree.

JaDogg
  • 417
  • 4
  • 12

2 Answers2

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.

jjaderberg
  • 3,489
  • 1
  • 14
  • 19
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

Sheharyar
  • 751
  • 7
  • 10