From reading the NERDTree documentation on github, I’ve learned that I can do such nifty things as automatically open nerdtree if vim starts with no buffer, and to automatically close vim if NERDTree is the only open buffer. However, my final issue is implementing the reverse – if for some reason NERDTree is the only open buffer and hasn’t triggered an exit by vim, closing the tree does basically nothing. I’d like vim to close in this situation so that I don’t have to type :q twice.
Here are the lines that implement the other conveniences:
autocmd vimenter * if !argc() | NERDTree | endif
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
NERDTree sucks without nerdtree-tabs, specifically: “When you close a file, the tab closes with it. No NERDTree hanging open.”