You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example from autocmd.txt:. The '|' seems to confuse the parser, and changing it to "|" doesn't help. Likely | should be treated as a literal if any whitespace follows it before the closing |.
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 where the pattern is expected. 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
The text was updated successfully, but these errors were encountered:
Likely | should be treated as a literal if any whitespace follows it before the closing |.
Similar for *. Here's a sample from autocmd.txt where the parser gets confused by a literal *:
Note that the autocommands for the *ReadPre events and all the Filter events
are not allowed to change the current buffer (you will get an error message if
this happens). This is to prevent the file to be read into the wrong buffer.
Example from autocmd.txt:. The
'|'
seems to confuse the parser, and changing it to"|"
doesn't help. Likely|
should be treated as a literal if any whitespace follows it before the closing|
.The text was updated successfully, but these errors were encountered: