runtimeZero
runtimeZero

Reputation: 28076

NERDTree not updating tree structure

I have installed NERDTree plugin in my vim. What I noticed is that when I create files via command prompt .. the newly created file does not get reflected in the NERDTree display.

Is there a add-on I am missing here ?

Upvotes: 3

Views: 1126

Answers (2)

Steven Yap
Steven Yap

Reputation: 188

If you look into ? of the NerdTree (eg. go to the nerdtree window and type ?), you will the shortcut r to refresh the tree directory.

Nerdtree does not refresh the directory automatically but you can manually trigger it by pressing r on the directory.

Sometimes the refresh doesn't refresh properly. Opening and closing the nerdtree directory will solve this issue.

Upvotes: 1

Dhruva Sagar
Dhruva Sagar

Reputation: 7307

  1. I would highly recommend to use NERDTree itself for file system manipulations, things like creating directories / files is done very easily from within NERDTree. Use the m within nerdtree to open the text based 'menu' for various operations you can perform on the file system.

  2. Even if you need to create files outside of vim, or maybe the files are generated etc, just hit r mapping within NERDTree to refresh the nerdtree and it'll show your created files / directories correctly.

  3. For quick help, hit ? within NERDTree buffer to have a look at it's API.

Upvotes: 7

Related Questions