|
1 | | -*autocmd.txt* For Vim version 7.4. Last change: 2016 Jul 29 |
| 1 | +*autocmd.txt* For Vim version 7.4. Last change: 2016 Sep 03 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -419,8 +419,8 @@ BufUnload Before unloading a buffer. This is when the |
419 | 419 | NOTE: When this autocommand is executed, the |
420 | 420 | current buffer "%" may be different from the |
421 | 421 | buffer being unloaded "<afile>". |
422 | | - Don't change to another buffer, it will cause |
423 | | - problems. |
| 422 | + Don't change to another buffer or window, it |
| 423 | + will cause problems! |
424 | 424 | When exiting and v:dying is 2 or more this |
425 | 425 | event is not triggered. |
426 | 426 | *BufWinEnter* |
@@ -784,7 +784,9 @@ QuickFixCmdPre Before a quickfix command is run (|:make|, |
784 | 784 | |:vimgrepadd|, |:lvimgrepadd|, |:cscope|, |
785 | 785 | |:cfile|, |:cgetfile|, |:caddfile|, |:lfile|, |
786 | 786 | |:lgetfile|, |:laddfile|, |:helpgrep|, |
787 | | - |:lhelpgrep|). |
| 787 | + |:lhelpgrep|, |:cexpr|, |:cgetexpr|, |
| 788 | + |:caddexpr|, |:cbuffer|, |:cgetbuffer|, |
| 789 | + |:caddbuffer|). |
788 | 790 | The pattern is matched against the command |
789 | 791 | being run. When |:grep| is used but 'grepprg' |
790 | 792 | is set to "internal" it still matches "grep". |
@@ -1065,6 +1067,9 @@ Note that for all systems the '/' character is used for path separator (even |
1065 | 1067 | MS-DOS and OS/2). This was done because the backslash is difficult to use |
1066 | 1068 | in a pattern and to make the autocommands portable across different systems. |
1067 | 1069 |
|
| 1070 | +It is possible to use |pattern| items, but they may not work as expected, |
| 1071 | +because of the translation done for the above. |
| 1072 | + |
1068 | 1073 | *autocmd-changes* |
1069 | 1074 | Matching with the pattern is done when an event is triggered. Changing the |
1070 | 1075 | buffer name in one of the autocommands, or even deleting the buffer, does not |
@@ -1163,11 +1168,12 @@ name! |
1163 | 1168 | different from existing {event} names, as this |
1164 | 1169 | most likely will not do what you intended. |
1165 | 1170 |
|
1166 | | - *:augroup-delete* *E367* *W19* |
| 1171 | + *:augroup-delete* *E367* *W19* *E936* |
1167 | 1172 | :aug[roup]! {name} Delete the autocmd group {name}. Don't use |
1168 | 1173 | this if there is still an autocommand using |
1169 | 1174 | this group! You will get a warning if doing |
1170 | | - it anyway. |
| 1175 | + it anyway. when the group is the current group |
| 1176 | + you will get error E936. |
1171 | 1177 |
|
1172 | 1178 | To enter autocommands for a specific group, use this method: |
1173 | 1179 | 1. Select the group with ":augroup {name}". |
|
0 commit comments