diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-11-05 18:19:24 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-11-05 18:19:24 +0100 |
commit | b0d45e7f5354375edd02afafde3bd37dac1515ff (patch) | |
tree | 26720e8fd22af04084e159c6365675e5e38161ab /runtime/doc/autocmd.txt | |
parent | aace21581345aa51c09d809ab3744a943a71c879 (diff) | |
download | vim-git-b0d45e7f5354375edd02afafde3bd37dac1515ff.tar.gz |
Update runtime files.
Diffstat (limited to 'runtime/doc/autocmd.txt')
-rw-r--r-- | runtime/doc/autocmd.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index e1e96a770..06931dfd3 100644 --- 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 followed by another command when the '|' 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 |