carlhuda/janus — pull request #311 by czak (2011-12-06 13:17:33+00:00)
Title: Group NERDTree-related autocommands within an :augroup

### Problem

I'm working with a pretty big project, and I don't want NERDTree to refresh on every `FocusGained` event. It just takes way too long on my system.

I could use the following command:

```
:autocmd! FocusGained
```

but this would remove **all** autocommands for this event.

### Solution

I propose an `:augroup` for the three `:autocmd`s related to NERDTRee. This way I can clearly target the specific autocommand in the current session or in `.gvimrc.local`:

```
:autocmd! AuNERDTreeCmd FocusGained
```

### Notes

* See attached code for the solution
* `AuNERDTreeCmd` name is inspired by another group name I found in my config: `AuNetrwShellCmd`. I believe this follows the convention.