Automatically quit vim if NERDTree is last and only buffer
问题 I have the following in my .vimrc: """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Open NERDTree by default """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" autocmd VimEnter * NERDTree autocmd VimEnter * wincmd p So, % vim file.txt opens NERDTree and focuses the cursor in the file.txt buffer. I make my edits, and hit :q on the buffer, and I'm left with . . . NERDTree. This is annoying. I could use :qa to close all buffers, and exit vim, but I'm used to the