diff --git a/nvim/pluginoptions.vim b/nvim/pluginoptions.vim index 4cde02e..54dbfff 100644 --- a/nvim/pluginoptions.vim +++ b/nvim/pluginoptions.vim @@ -11,6 +11,8 @@ highlight NERDTreeCWD guifg=#9CA3AF ctermfg=gray highlight NERDTreeFlags guifg=#4B5563 ctermfg=green highlight NERDTreeExecFile guifg=#DC2626 ctermfg=green +" Exit Vim if NERDTree is the only window remaining in the only tab. +autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif " AIRLINE SETUP " =========================