fix: close nerdtree if nerdtree is the last open buffer

This commit is contained in:
Markus Pesch 2018-01-29 15:58:40 +01:00
parent f7f70a83e2
commit ee6a23d5a0
No known key found for this signature in database
GPG Key ID: 0C18FADC12547561

4
vimrc

@ -7,6 +7,10 @@ autocmd Filetype make setlocal noexpandtab " use tabs in
autocmd BufNewFile,BufRead rsnapshot.conf setlocal noexpandtab " use tabs in rsnapshot.conf files instead whitespaces
autocmd vimenter * NERDTree " AutoStart nerdtree
" Close NerdTree, if NerdTree is the last open buffer
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" Key values
" Can do almost everything that set can do, plus more.
" It can assign a value to