Only call NERDTree while there is no filename

This commit is contained in:
Gea-Suan Lin
2012-04-30 04:03:51 +08:00
parent 99e8923d45
commit 1175a994d3

2
.vimrc
View File

@@ -45,5 +45,5 @@ au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|
" "
call pathogen#infect() call pathogen#infect()
" "
autocmd vimenter * NERDTree autocmd vimenter * if !argc() | NERDTree | endif
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif