diff runtime/doc/autocmd.txt @ 12785:65d7fd8381a3

Update runtime files. commit https://github.com/vim/vim/commit/b0d45e7f5354375edd02afafde3bd37dac1515ff Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 5 18:19:24 2017 +0100 Update runtime files.
author Christian Brabandt <cb@256bit.org>
date Sun, 05 Nov 2017 18:30:05 +0100
parents 3b26420fc639
children 6e81a68d63a1
line wrap: on
line diff
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt*   For Vim version 8.0.  Last change: 2017 Oct 21
+*autocmd.txt*   For Vim version 8.0.  Last change: 2017 Nov 05
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -68,7 +68,14 @@ Note: The ":autocmd" command can only be
 '|' appears before {cmd}.  This works: >
 	:augroup mine | au! BufRead | augroup END
 But this sees "augroup" as part of the defined command: >
+	:augroup mine | au! BufRead * | augroup END
 	:augroup mine | au BufRead * set tw=70 | augroup END
+Instead you can put the group name into the command: >
+	:au! mine BufRead *
+	:au mine BufRead * set tw=70
+Or use `:execute`: >
+	:augroup mine | exe "au! BufRead *" | augroup END
+	:augroup mine | exe "au BufRead * set tw=70" | augroup END
 
 Note that special characters (e.g., "%", "<cword>") in the ":autocmd"
 arguments are not expanded when the autocommand is defined.  These will be