mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
runtime(vim): fix incorrect highlighting of User autocmds
There is no pattern after the user event name. The user event name is the pattern. closes: #17568 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
48295111e5
commit
8311e7d6b4
@ -2,7 +2,7 @@
|
||||
" Language: Vim script
|
||||
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2025 Jun 11
|
||||
" Last Change: 2025 Jun 18
|
||||
" Former Maintainer: Charles E. Campbell
|
||||
|
||||
" DO NOT CHANGE DIRECTLY.
|
||||
@ -121,7 +121,7 @@ syn keyword vimAutoEvent contained FilterWritePost FilterWritePre FocusGained Fo
|
||||
syn keyword vimAutoEvent contained WinScrolled skipwhite nextgroup=vimAutoEventSep,@vimAutocmdPattern
|
||||
|
||||
syn keyword vimAutoEvent contained User skipwhite nextgroup=vimUserAutoEvent
|
||||
syn match vimUserAutoEvent contained "\<\h\w*\>" skipwhite nextgroup=vimAutoEventSep,@vimAutocmdPattern
|
||||
syn match vimUserAutoEvent contained "\<\h\w*\>" skipwhite nextgroup=vimUserAutoEventSep,vimAutocmdMod,vimAutocmdBlock
|
||||
|
||||
" Highlight commonly used Groupnames {{{2
|
||||
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
|
||||
@ -1260,6 +1260,7 @@ syn match vimAutocmdMod contained "++once\>" skipwhite nextgroup=vimAutocmdMod,v
|
||||
" higher priority than vimAutocmdGroup, assume no group is so named
|
||||
syn match vimAutoEventGlob contained "*" skipwhite nextgroup=@vimAutocmdPattern
|
||||
syn match vimAutoEventSep contained "\a\@1<=," nextgroup=vimAutoEvent
|
||||
syn match vimUserAutoEventSep contained "\a\@1<=," nextgroup=vimUserAutoEvent
|
||||
|
||||
syn match vimAutocmd "\<au\%[tocmd]\>" skipwhite nextgroup=vimAutocmdBang,vimAutocmdGroup,vimAutoEvent,vimAutoEventGlob
|
||||
|
||||
|
Reference in New Issue
Block a user