1
0
mirror of https://github.com/aquatix/dotfiles.git synced 2025-12-06 22:55:10 +01:00

Close vim if the only window left open is a NERDTree

This commit is contained in:
Michiel Scholten
2014-09-20 20:43:54 +02:00
parent 33ecacfa61
commit acdbe0dac1

2
.vimrc
View File

@@ -28,6 +28,8 @@ Plugin 'jnurmine/Zenburn.git'
" Quick file system tree, mapped to Ctrl+n for quick toggle
Plugin 'scrooloose/nerdtree'
map <C-n> :NERDTreeToggle<CR>
" 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