Permalink
Browse files

Merge pull request #311 from czak/master

Group NERDTree-related autocommands within an :augroup
  • Loading branch information...
2 parents 36ad619 + 5433dcb commit 7ae0b491a78229f2756f78aed7bf248510b50de5 @kalbasit kalbasit committed Dec 6, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 gvimrc
View
7 gvimrc
@@ -84,9 +84,10 @@ endfunction
" Project Tree
if exists("loaded_nerd_tree")
- autocmd VimEnter * call s:CdIfDirectory(expand("<amatch>"))
- autocmd FocusGained * call s:UpdateNERDTree()
- autocmd WinEnter * call s:CloseIfOnlyNerdTreeLeft()
+ augroup AuNERDTreeCmd
+ autocmd AuNERDTreeCmd VimEnter * call s:CdIfDirectory(expand("<amatch>"))
+ autocmd AuNERDTreeCmd FocusGained * call s:UpdateNERDTree()
+ autocmd AuNERDTreeCmd WinEnter * call s:CloseIfOnlyNerdTreeLeft()
endif
" Close all open buffers on entering a window if the only

0 comments on commit 7ae0b49

Please sign in to comment.