title: Automatically quit vim if NERDTree is last and only buffer
body: <p>I have the following in my .vimrc:</p>
  
  <pre><code>""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " Open NERDTree by default
  """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  autocmd VimEnter * NERDTree
  autocmd VimEnter * wincmd p
  </code></pre>
  
  <p>So,</p>
  
  <pre><code>% vim file.txt
  </code></pre>
  
  <p>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.</p>
  
  <p>I could use :qa to close all buffers, and exit vim, but I'm used to the :q trope.  So I'm wondering if there's a way to detect that the only remaining buffer is NERDTree, and "unify" the two buffers, for purposes of :q</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Ask and ye shall receive:  <a href="https://github.com/scrooloose/nerdtree/issues#issue/21" rel="noreferrer">https://github.com/scrooloose/nerdtree/issues#issue/21</a></p>