aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorlonerover <pathfinder1644@yahoo.com>2017-01-05 12:06:09 +0800
committerlonerover <pathfinder1644@yahoo.com>2017-01-05 13:33:56 +0800
commitbef645e5e44068f5f225cdeca5667be9f691e1e1 (patch)
tree984c544a4ce06bce537d49c639f8b30d40a167bc /runtime
parente21aef1e1002581dc653176eb3d7d4f2b06424f8 (diff)
downloadrneovim-bef645e5e44068f5f225cdeca5667be9f691e1e1.tar.gz
rneovim-bef645e5e44068f5f225cdeca5667be9f691e1e1.tar.bz2
rneovim-bef645e5e44068f5f225cdeca5667be9f691e1e1.zip
vim-patch:7.4.2103
Problem: Can't have "augroup END" right after ":au!". Solution: Check for the bar character before the command argument. https://github.com/vim/vim/commit/e99e84497b89e5f91df519790802770920ecf4fe
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/autocmd.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 4f23aee83d..65e091edf5 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -49,9 +49,6 @@ effects. Be careful not to destroy your text.
==============================================================================
2. Defining autocommands *autocmd-define*
-Note: The ":autocmd" command cannot be followed by another command, since any
-'|' is considered part of the command.
-
*:au* *:autocmd*
:au[tocmd] [group] {event} {pat} [nested] {cmd}
Add {cmd} to the list of commands that Vim will
@@ -64,6 +61,12 @@ Note: The ":autocmd" command cannot be followed by another command, since any
The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand.
See |autocmd-buflocal|.
+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 * 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
expanded when the Event is recognized, and the {cmd} is executed. The only