-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runtime(vim): correctly handle ! attrubute for augroup/doautocmd/doau…
…toall I noticed that ``` :autocmd! FooBar :augroup! FooBar ``` looks slightly different to how the ! is drawn. While the `!` for the autocmd case is shown in the same color as autocmd, for :augroup is is shown as VimEventList In addition, the vim syntax seems to accept doautocmd! and doautoall! (with bang attribute) even so this is not valid. So let's fix all of those and mark the ! as an error for the the :doautocmd/doautoall case. Signed-off-by: Christian Brabandt <[email protected]>
- Loading branch information
Showing
6 changed files
with
51 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|a+0#af5f00255#ffffff0|u|g|r|o|u|p| +0#0000000&|!|@|#|$|%|^|&|*|(|)|_|+| ||| |a+0#af5f00255&|u|t|o|c|m|d|!| +0#0000000&||| |a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @29 | ||
|a+0#af5f00255&|u|g|r|o|u|p|!| +0#0000000&|!|@|#|$|%|^|&|*|(|)|_|+| @53 | ||
@75 | ||
|"+0#0000e05&| |l|i|s|t| |g|r|o|u|p|s| +0#0000000&@61 | ||
|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&@67 | ||
> @74 | ||
|"+0#0000e05&| |b|a|n|g| |i|s| |a|n| |e|r@1|o|r| |f|o|r| |d|o|a|u|t|o|c|m|d| |a|n|d| |d|o|a|u|t|o|a|l@1| +0#0000000&@28 | ||
|a+0#af5f00255&|u|g|r|o|u|p|!| +0#0000000&|f|o@1|b|a|r| @59 | ||
|a+0#af5f00255&|u|t|o|c|m|d|!| +0#0000000&|f|o@1|b|a|r| @59 | ||
@75 | ||
|d+0#af5f00255&|o|a|u|t|o|c|m|d|!+0#ffffff16#ff404010| +0#0000000#ffffff0|F+0#00e0003&|i|l|e|T|y|p|e|,+0#0000000&|B+0#00e0003&|u|f|E|n|t|e|r| +0#0000000&@46 | ||
|d+0#af5f00255&|o|a|u|t|o|a|l@1|!+0#ffffff16#ff404010| +0#0000000#ffffff0|B+0#00e0003&|u|f|W|i|n|E|n|t|e|r|,+0#0000000&|W+0#00e0003&|i|n|E|n|t|e|r| +0#0000000&@43 | ||
|~+0#4040ff13&| @73 | ||
|~| @73 | ||
|~| @73 | ||
|~| @73 | ||
|~| @73 | ||
|~| @73 | ||
|~| @73 | ||
| +0#0000000&@56|1|9|,|0|-|1| @7|B|o|t| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com> | ||
" Doug Kearns <[email protected]> | ||
" URL: https://github.com/vim-jp/syntax-vim-ex | ||
" Last Change: 2024 May 27 | ||
" Last Change: 2024 Jun 03 | ||
" Former Maintainer: Charles E. Campbell | ||
|
||
" DO NOT CHANGE DIRECTLY. | ||
|
@@ -559,10 +559,14 @@ syn keyword vimAbb abc[lear] cabc[lear] iabc[lear] skipwhite nextgroup=vimMapMod | |
|
||
" Autocmd: {{{2 | ||
" ======= | ||
syn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent nextgroup=vimAutoCmdSpace | ||
syn match vimAutoEventList contained "\(\a\+,\)*\a\+" contains=vimAutoEvent nextgroup=vimAutoCmdSpace | ||
syn match vimAutoCmdSpace contained "\s\+" nextgroup=vimAutoCmdSfxList | ||
syn match vimAutoCmdSfxList contained "\S*" skipwhite nextgroup=vimAutoCmdMod,vimAutoCmdBlock | ||
syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList | ||
if !exists("g:vimsyn_noerror") | ||
syn match vimAutoBangError contained "!" skipwhite nextgroup=vimAutoEventList | ||
endif | ||
syn keyword vimAutoCmd au[tocmd] skipwhite nextgroup=vimAugroupBang,vimAutoEventList | ||
syn keyword vimAutoCmd do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoBangError,vimAutoEventList | ||
syn match vimAutoCmdMod "\(++\)\=\(once\|nested\)" skipwhite nextgroup=vimAutoCmdBlock | ||
syn region vimAutoCmdBlock contained matchgroup=vimSep start="{" end="}" contains=@vimDefBodyList | ||
|
||
|
@@ -1091,6 +1095,7 @@ if !exists("skip_vim_syntax_inits") | |
hi def link vimSubstFlagErr vimError | ||
hi def link vimSynCaseError vimError | ||
hi def link vimSynFoldMethodError vimError | ||
hi def link vimAutoBangError vimError | ||
hi def link vimBufnrWarn vimWarn | ||
endif | ||
|
||
|