I’m using the vim plugin NERDTree, and I have the following command in my vimrc file so that nerdtree automatically runs when I open vim:
au VimEnter * NERDTree
However, when I create a new tab, I want NERDTreeMirror to run on the new tab (which, the command above isn’t even running on new tabs so adding au VimEnter * NERDTreeMirror is ineffective).
Is there something I can set in the vimrc file to run au VimEnter * NERDTreeMirror on new tabs when they’re opened?
You may take a look at all the autocmd events using
:help event. There are several interesting events likeTabEnterandBufNew.By the way, it’s more convenient for me to use F3 to toggle NERDTree in the current tab: