diff --git a/.vimrc b/.vimrc index 97f4cc3..c9b92fd 100644 --- a/.vimrc +++ b/.vimrc @@ -28,6 +28,8 @@ Plugin 'jnurmine/Zenburn.git' " Quick file system tree, mapped to Ctrl+n for quick toggle Plugin 'scrooloose/nerdtree' map :NERDTreeToggle +" close vim if the only window left open is a NERDTree +autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif " == Content convenience