The general "always open NERDTree" behavior is added by NERDTreeTabs, and you can disable it by adding the following line to your .gvimrc
file:
let g:nerdtree_tabs_open_on_gui_startup = 0
(There's also an equivalent option for console startup, but it already defaults to 0.)
Then, from the NERDTree README:
Q. How can I open a NERDTree automatically when vim starts up if no files were specified?
A. Stick this in your vimrc
autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
Note: This may not be a 100% perfect solution-- for example, new tabs will be opened without a NERDTree window. It might be possible to fix that by replacing the NerdTree
with NERDTreeTabsToggle
above, but doing that causes vim to show an error about trailing characters, and I don't know why that is.