Vim: How to synchronize NERDTree with current opened tab file path

gvimnerdtreevimvim-plugins

When I open a new tab with different path from the previous file in VIM, NERDTree will still remains the same directory hierarchy of the previous file.

Is there a sync shortcut to change the current root directory to the new opened file's directory?

autocmd BufEnter * lcd %:p:h

Now all what you have to do after opening a file in a new tab is :NERDTreeToggle in the new tab itself.