diff options
Diffstat (limited to '_vim')
-rw-r--r-- | _vim/vimrc | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -345,6 +345,8 @@ nnoremap <leader>n :NERDTreeToggle<cr> " Start NERDTree when Vim is started without file arguments. autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | endif +" Close the tab if NERDTree is the only window remaining in it. +autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif " Mappings for Tagbar nnoremap <leader>t :TagbarToggle<cr> |