mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
runtime(vim): Update base-syntax, match multiline continued comments (#13936)
Match multiline (continued) line comments. Continued tail comments are not supported yet. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" URL: https://github.com/vim-jp/syntax-vim-ex
|
||||
" Last Change: 2024 Jun 05
|
||||
" Last Change: 2024 Jun 11
|
||||
" Former Maintainer: Charles E. Campbell
|
||||
|
||||
" DO NOT CHANGE DIRECTLY.
|
||||
@ -812,16 +812,17 @@ syn match vimCtrlChar "[--]"
|
||||
" Beginners - Patterns that involve ^ {{{2
|
||||
" =========
|
||||
if s:vim9script
|
||||
syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle contained
|
||||
syn match vim9LineComment +^[ \t:]*#.*$+ contains=@vimCommentGroup,vimCommentString,vim9CommentTitle
|
||||
syn region vim9LineComment start=+^[ \t:]*\zs#.*$+ skip=+\n\s*\\\|\n\s*#\\ + end="$" contains=@vimCommentGroup,vimCommentString,vim9CommentTitle
|
||||
syn region vimLineComment start=+^[ \t:]*\zs".*$+ skip=+\n\s*\\\|\n\s*"\\ + end="$" contains=@vimCommentGroup,vimCommentString,vimCommentTitle contained
|
||||
else
|
||||
syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
|
||||
syn match vim9LineComment +^[ \t:]*#.*$+ contains=@vimCommentGroup,vimCommentString,vim9CommentTitle contained
|
||||
syn region vimLineComment start=+^[ \t:]*\zs".*$+ skip=+\n\s*\\\|\n\s*"\\ + end="$" contains=@vimCommentGroup,vimCommentString,vimCommentTitle
|
||||
syn region vim9LineComment start=+^[ \t:]*\zs#.*$+ skip=+\n\s*\\\|\n\s*#\\ + end="$" contains=@vimCommentGroup,vimCommentString,vim9CommentTitle contained
|
||||
endif
|
||||
syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
|
||||
syn match vim9CommentTitle '#\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vim9CommentTitleLeader,vimTodo,@vimCommentGroup
|
||||
|
||||
syn match vimContinue "^\s*\zs\\"
|
||||
syn match vimContinueComment '^\s*\zs["#]\\ .*' contained
|
||||
syn match vimContinueComment '^\s*\zs["#]\\ .*'
|
||||
syn cluster vimContinue contains=vimContinue,vimContinueComment
|
||||
syn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue
|
||||
syn match vimCommentTitleLeader '"\s\+'ms=s+1 contained
|
||||
|
@ -4,16 +4,16 @@
|
||||
@75
|
||||
|#+0#0000e05&| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@53
|
||||
@75
|
||||
| +0#0000e05&|#| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
|
||||
@1|#+0#0000e05&| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
|
||||
@1|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&@57
|
||||
@75
|
||||
|f+0#af5f00255&|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@59
|
||||
| +0#0000e05&@1|"| |L|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@49
|
||||
@2|"+0#0000e05&| |L|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@49
|
||||
@2|#| |4+0#e000002&|2| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@58
|
||||
|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
|
||||
@75
|
||||
|d+0#af5f00255&|e|f|!| +0#0000000&|B|a|r|(+0#e000e06&|)| +0#0000000&@64
|
||||
| +0#0000e05&@1|#| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51
|
||||
@2|#+0#0000e05&| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51
|
||||
@2|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
|
||||
|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
|
||||
@75
|
@ -1,20 +1,20 @@
|
||||
| +0&#ffffff0@74
|
||||
|d+0#af5f00255&|e|f|!| +0#0000000&|B|a|r|(+0#e000e06&|)| +0#0000000&@64
|
||||
| +0#0000e05&@1|#| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51
|
||||
@2|#+0#0000e05&| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51
|
||||
@2|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
|
||||
|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
|
||||
> @74
|
||||
|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|-+0#af5f00255&|c+0#e000e06&|o|u|n|t| +0#0000000&|F|o@1|C|o|m@1|a|n|d| |{+0#e000e06&| +0#0000000&@47
|
||||
| +0#0000e05&@1|#| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51
|
||||
@2|#+0#0000e05&| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51
|
||||
@2|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
|
||||
|}+0#e000e06&| +0#0000000&@73
|
||||
@75
|
||||
|a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&|B+0#00e0003&|u|f|N|e|w|F|i|l|e| +0#0000000&|*| |{+0#e000e06&| +0#0000000&@52
|
||||
| +0#0000e05&@1|#| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51
|
||||
@2|#+0#0000e05&| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51
|
||||
@2|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
|
||||
|}+0#e000e06&| +0#0000000&@73
|
||||
@75
|
||||
@75
|
||||
|#+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| +0#0000000&@59
|
||||
|#+0#0000e05&| |M|u|l|t|i|l|i|n|e| |c|o|m@1|e|n|t|s| +0#0000000&@54
|
||||
@75
|
||||
@57|1|9|,|0|-|1| @7|5|9|%|
|
||||
@57|1|9|,|0|-|1| @7|2|8|%|
|
20
runtime/syntax/testdir/dumps/vim9_comment_02.dump
Normal file
20
runtime/syntax/testdir/dumps/vim9_comment_02.dump
Normal file
@ -0,0 +1,20 @@
|
||||
| +0&#ffffff0@74
|
||||
|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@65
|
||||
| +0#0000e05&@1|\| |c|o|n|t|i|n|u|i|n|g| |c|o|m@1|e|n|t| +0#0000000&@52
|
||||
| +0#0000e05&@1|\| |c|o|n|t|i|n|u|i|n|g| |c|o|m@1|e|n|t| +0#0000000&@52
|
||||
@75
|
||||
>#+0#0000e05&| |:|F|o@1| +0#0000000&@68
|
||||
| +0#0000e05&@5|\| |a|r|g|1| +0#0000000&@62
|
||||
| +0#0000e05&@5|#|\| |c|o|m@1|e|n|t| +0#0000000&@58
|
||||
| +0#0000e05&@5|\| |a|r|g|2| +0#0000000&@62
|
||||
@75
|
||||
|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|T|O|P|"| +0#0000000&@64
|
||||
@75
|
||||
@75
|
||||
|#+0#0000e05&| |L|i|n|e|-|c|o|n|t|i|n|u|a|t|i|o|n| |c|o|m@1|e|n|t|s| +0#0000000&@46
|
||||
@75
|
||||
|:|F|o@1| @70
|
||||
@6|#+0#0000e05&|\| |l|i|n|e| |c|o|n|t|i|n|u|a|t|i|o|n| |c|o|m@1|e|n|t| +0#0000000&@40
|
||||
@6|\+0#e000e06&| +0#0000000&|a|r|g|1| @62
|
||||
@6|#+0#0000e05&|\| |l|i|n|e| |c|o|n|t|i|n|u|a|t|i|o|n| |c|o|m@1|e|n|t| +0#0000000&@40
|
||||
@57|3|7|,|1| @9|6|8|%|
|
@ -1,9 +1,14 @@
|
||||
| +0&#ffffff0@74
|
||||
| +0&#ffffff0@5|#+0#0000e05&|\| |l|i|n|e| |c|o|n|t|i|n|u|a|t|i|o|n| |c|o|m@1|e|n|t| +0#0000000&@40
|
||||
@6|\+0#e000e06&| +0#0000000&|a|r|g|2| @62
|
||||
@75
|
||||
@75
|
||||
|#+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| +0#0000000&@59
|
||||
> @74
|
||||
|i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|"+0#e000002&|:|D|i|f@1|O|r|i|g|"|)+0#e000e06&| +0#0000000&@51
|
||||
@2|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| |v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|t|=+0#0000000&|n|o|f|i|l|e| ||+0#af5f00255&| +0#0000000&|r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e|d|i|t| +0#0000000&|%+0#af5f00255&@1| +0#0000000&||| |0+0#e000002&|d+0#0000000&|_| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&
|
||||
@18|\+0#e000e06&| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33
|
||||
|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
|
||||
> @74
|
||||
@75
|
||||
@75
|
||||
|#+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1@1|3|0|7| |a|n|d| |#|1@1|5|6|0| +0#0000000&@48
|
||||
@75
|
||||
@ -12,9 +17,4 @@
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|3|7|,|0|-|1| @7|B|o|t|
|
||||
| +0#0000000&@56|5@1|,|0|-|1| @7|B|o|t|
|
@ -1,9 +1,9 @@
|
||||
|}+0#e000e06#ffffff0| +0#0000000&@73
|
||||
@75
|
||||
|a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&|B+0#00e0003&|u|f|N|e|w|F|i|l|e| +0#0000000&|*| |{+0#e000e06&| +0#0000000&@52
|
||||
| +0#0000e05&@1|#| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51
|
||||
@2|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
|
||||
|}+0#e000e06&| +0#0000000&@73
|
||||
| +0&#ffffff0@74
|
||||
|:|F|o@1| @70
|
||||
@6|#+0#0000e05&|\| |l|i|n|e| |c|o|n|t|i|n|u|a|t|i|o|n| |c|o|m@1|e|n|t| +0#0000000&@40
|
||||
@6|\+0#e000e06&| +0#0000000&|a|r|g|1| @62
|
||||
@6|#+0#0000e05&|\| |l|i|n|e| |c|o|n|t|i|n|u|a|t|i|o|n| |c|o|m@1|e|n|t| +0#0000000&@40
|
||||
@6|\+0#e000e06&| +0#0000000&|a|r|g|2| @62
|
||||
@75
|
||||
@75
|
||||
|#+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| +0#0000000&@59
|
||||
@ -17,4 +17,4 @@
|
||||
|#+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1@1|3|0|7| |a|n|d| |#|1@1|5|6|0| +0#0000000&@48
|
||||
@75
|
||||
>#+0#0000e05&| |T|h|i|s| |i|s| |w|h|a|t| |w|e| |c|a|l@1| |"| |b|l|a|h| +0#0000000&@45
|
||||
@57|4|1|,|1| @9|B|o|t|
|
||||
@57|6|4|,|1| @9|B|o|t|
|
@ -12,7 +12,7 @@
|
||||
@75
|
||||
|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@65
|
||||
@75
|
||||
| +0#0000e05&|#| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
|
||||
@1|#+0#0000e05&| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
|
||||
@1|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&@57
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|
@ -12,7 +12,7 @@
|
||||
@75
|
||||
|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@65
|
||||
@75
|
||||
| +0#0000e05&|#| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
|
||||
@1|#+0#0000e05&| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
|
||||
@1>"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&@57
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|
@ -3,7 +3,7 @@
|
||||
@75
|
||||
|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@65
|
||||
@75
|
||||
| +0#0000e05&|#| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
|
||||
@1|#+0#0000e05&| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
|
||||
@1|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&@57
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|
@ -3,7 +3,7 @@
|
||||
@75
|
||||
|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@65
|
||||
@75
|
||||
| +0#0000e05&|#| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
|
||||
@1|#+0#0000e05&| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
|
||||
@1>"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&@57
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|
@ -5,7 +5,7 @@
|
||||
|#| |4+0#e000002&|2| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@60
|
||||
@75
|
||||
|f+0#af5f00255&|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@59
|
||||
| +0#0000e05&@1|"| |L|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@49
|
||||
@2|"+0#0000e05&| |L|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@49
|
||||
@2|#| |4+0#e000002&|2| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@58
|
||||
|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
|
||||
@75
|
@ -12,9 +12,9 @@
|
||||
|}+0#e000e06&| +0#0000000&@73
|
||||
@75
|
||||
@75
|
||||
|"+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| +0#0000000&@59
|
||||
|"+0#0000e05&| |M|u|l|t|i|l|i|n|e| |c|o|m@1|e|n|t|s| +0#0000000&@54
|
||||
@75
|
||||
|i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|"+0#e000002&|:|D|i|f@1|O|r|i|g|"|)+0#e000e06&| +0#0000000&@51
|
||||
@2|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| |v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|t|=+0#0000000&|n|o|f|i|l|e| ||+0#af5f00255&| +0#0000000&|r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e|d|i|t| +0#0000000&|#| ||| |0+0#e000002&|d+0#0000000&|_| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@1
|
||||
@18|\+0#e000e06&| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33
|
||||
@57|1|9|,|3| @9|5|0|%|
|
||||
|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@65
|
||||
| +0#0000e05&@1|\| |c|o|n|t|i|n|u|i|n|g| |c|o|m@1|e|n|t| +0#0000000&@52
|
||||
| +0#0000e05&@1|\| |c|o|n|t|i|n|u|i|n|g| |c|o|m@1|e|n|t| +0#0000000&@52
|
||||
@57|1|9|,|3| @9|2|6|%|
|
20
runtime/syntax/testdir/dumps/vim_comment_02.dump
Normal file
20
runtime/syntax/testdir/dumps/vim_comment_02.dump
Normal file
@ -0,0 +1,20 @@
|
||||
| +0#0000e05#ffffff0@1|\| |c|o|n|t|i|n|u|i|n|g| |c|o|m@1|e|n|t| +0#0000000&@52
|
||||
@75
|
||||
|"+0#0000e05&| |:|F|o@1| +0#0000000&@68
|
||||
| +0#0000e05&@5|\| |a|r|g|1| +0#0000000&@62
|
||||
| +0#0000e05&@5|"|\| |c|o|m@1|e|n|t| +0#0000000&@58
|
||||
| +0#0000e05&@5>\| |a|r|g|2| +0#0000000&@62
|
||||
@75
|
||||
|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|T|O|P|"| +0#0000000&@64
|
||||
@75
|
||||
@75
|
||||
|"+0#0000e05&| |L|i|n|e|-|c|o|n|t|i|n|u|a|t|i|o|n| |c|o|m@1|e|n|t|s| +0#0000000&@46
|
||||
@75
|
||||
|:|F|o@1| @70
|
||||
@6|"+0#0000e05&|\| |l|i|n|e| |c|o|n|t|i|n|u|a|t|i|o|n| |c|o|m@1|e|n|t| +0#0000000&@40
|
||||
@6|\+0#e000e06&| +0#0000000&|a|r|g|1| @62
|
||||
@6|"+0#0000e05&|\| |l|i|n|e| |c|o|n|t|i|n|u|a|t|i|o|n| |c|o|m@1|e|n|t| +0#0000000&@40
|
||||
@6|\+0#e000e06&| +0#0000000&|a|r|g|2| @62
|
||||
@75
|
||||
@75
|
||||
@57|3|7|,|7| @9|6|3|%|
|
20
runtime/syntax/testdir/dumps/vim_comment_03.dump
Normal file
20
runtime/syntax/testdir/dumps/vim_comment_03.dump
Normal file
@ -0,0 +1,20 @@
|
||||
| +0&#ffffff0@74
|
||||
|"+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| +0#0000000&@59
|
||||
@75
|
||||
|i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|"+0#e000002&|:|D|i|f@1|O|r|i|g|"|)+0#e000e06&| +0#0000000&@51
|
||||
@2|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| |v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|t|=+0#0000000&|n|o|f|i|l|e| ||+0#af5f00255&| +0#0000000&|r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e|d|i|t| +0#0000000&|#| ||| |0+0#e000002&|d+0#0000000&|_| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@1
|
||||
@18>\+0#e000e06&| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33
|
||||
|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
|
||||
@75
|
||||
@75
|
||||
|"+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1@1|3|0|7| |a|n|d| |#|1@1|5|6|0| +0#0000000&@48
|
||||
@75
|
||||
|"+0#0000e05&| |T|h|i|s| |i|s| |w|h|a|t| |w|e| |c|a|l@1| |"| |b|l|a|h| +0#0000000&@45
|
||||
@75
|
||||
@75
|
||||
|"+0#0000e05&| |I|s@1|u|e| |#| |#|9|5|8|7| +0#0000000&@59
|
||||
@75
|
||||
|d+0#af5f00255&|e|f| +0#0000000&|C|o|m@1|e|n|t|T|i|t|l|e|(+0#e000e06&|)| +0#0000000&@56
|
||||
| +0#0000e05&@1|#| |T|i|t|l|e|:| |.@2| +0#0000000&@60
|
||||
|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
|
||||
@57|5@1|,|5|-|1|9| @6|B|o|t|
|
@ -15,6 +15,6 @@
|
||||
|"+0#0000e05&| |I|s@1|u|e| |#| |#|9|5|8|7| +0#0000000&@59
|
||||
@75
|
||||
|d+0#af5f00255&|e|f| +0#0000000&|C|o|m@1|e|n|t|T|i|t|l|e|(+0#e000e06&|)| +0#0000000&@56
|
||||
| +0#0000e05&@1|#| +0#0000000&|T+0#e000e06&|i|t|l|e|:| +0#0000e05&|.@2| +0#0000000&@60
|
||||
| +0#0000e05&@1|#| |T|i|t|l|e|:| |.@2| +0#0000000&@60
|
||||
>e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
|
||||
@57|4|5|,|1| @9|B|o|t|
|
||||
@57|6|8|,|1| @9|B|o|t|
|
@ -1,20 +0,0 @@
|
||||
| +0&#ffffff0@17|\+0#e000e06&| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33
|
||||
|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
|
||||
@75
|
||||
@75
|
||||
|"+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1@1|3|0|7| |a|n|d| |#|1@1|5|6|0| +0#0000000&@48
|
||||
> @74
|
||||
|"+0#0000e05&| |T|h|i|s| |i|s| |w|h|a|t| |w|e| |c|a|l@1| |"| |b|l|a|h| +0#0000000&@45
|
||||
@75
|
||||
@75
|
||||
|"+0#0000e05&| |I|s@1|u|e| |#| |#|9|5|8|7| +0#0000000&@59
|
||||
@75
|
||||
|d+0#af5f00255&|e|f| +0#0000000&|C|o|m@1|e|n|t|T|i|t|l|e|(+0#e000e06&|)| +0#0000000&@56
|
||||
| +0#0000e05&@1|#| +0#0000000&|T+0#e000e06&|i|t|l|e|:| +0#0000e05&|.@2| +0#0000000&@60
|
||||
|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|3|7|,|0|-|1| @7|B|o|t|
|
@ -5,7 +5,7 @@
|
||||
@75
|
||||
>f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
|
||||
@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
|
||||
| +0#0000e05&@1|"| |t|r|a|i|l|i|n|g| |w|h|i|t|e|s|p|a|c|e| +0#0000000&@51
|
||||
@2|"+0#0000e05&| |t|r|a|i|l|i|n|g| |w|h|i|t|e|s|p|a|c|e| +0#0000000&@51
|
||||
|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
|
||||
@75
|
||||
|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
|
||||
|
@ -10,7 +10,7 @@
|
||||
|"+0#0000e05&| |c|o|m@1|e|n|t|s| +0#0000000&@64
|
||||
@75
|
||||
|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
|
||||
| +0#0000e05&@1|"| |L|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@49
|
||||
@2|"+0#0000e05&| |L|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@49
|
||||
@2|#| |4+0#e000002&|2| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@58
|
||||
@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
|
||||
|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
|
||||
|
@ -4,7 +4,7 @@
|
||||
|"+0#0000e05&| |c|o|m@1|e|n|t|s| +0#0000000&@64
|
||||
@75
|
||||
|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
|
||||
| +0#0000e05&@1|"| |L|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@49
|
||||
@2|"+0#0000e05&| |L|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@49
|
||||
@2|#| |4+0#e000002&|2| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@58
|
||||
@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
|
||||
|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
|
||||
|
@ -12,9 +12,9 @@
|
||||
|"+0#0000e05&| @2|"+0#e000002&|c|l|u|s|t|e|r|"| +0#0000e05&|s|h|o|u|l|d| |n|o|t| |b|e| |h|i|g|h|l|i|g|h|t|e|d| |o|u|t|s|i|d|e| |o|f| |:|s|y|n|t|a|x| |c|o|m@1|a|n|d|s| +0#0000000&@7
|
||||
@75
|
||||
|f+0#af5f00255&|u|n|c|t|i|o|n|!| +0#0000000&|s+0#e000e06&|:|C+0#0000000&|o|n|t|a|i|n|e|d|G|r|o|u|p|(+0#e000e06&|)| +0#0000000&@46
|
||||
| +0#0000e05&@1|"| |.@2| +0#0000000&@67
|
||||
@2|"+0#0000e05&| |.@2| +0#0000000&@67
|
||||
@2|f+0#af5f00255&|o|r| +0#0000000&|c+0#00e0e07&|l|u|s|t|e|r| +0#0000000&|i+0#af5f00255&|n| +0#0000000&|[|'+0#e000002&|m|a|r|k|d|o|w|n|H|i|g|h|l|i|g|h|t|_|z|s|h|'|,+0#0000000&| |'+0#e000002&|z|s|h|'|]+0#0000000&| @25
|
||||
| +0#0000e05&@3|"| |.@2| +0#0000000&@65
|
||||
@4|"+0#0000e05&| |.@2| +0#0000000&@65
|
||||
@2|e+0#af5f00255&|n|d|f|o|r| +0#0000000&@66
|
||||
| +0#0000e05&@1|"| |.@2| +0#0000000&@67
|
||||
@2|"+0#0000e05&| |.@2| +0#0000000&@67
|
||||
@57|1|6|3|,|7| @8|9@1|%|
|
||||
|
@ -11,10 +11,10 @@
|
||||
|"+0#0000e05&| @2|"+0#e000002&|c|l|u|s|t|e|r|"| +0#0000e05&|s|h|o|u|l|d| |n|o|t| |b|e| |h|i|g|h|l|i|g|h|t|e|d| |o|u|t|s|i|d|e| |o|f| |:|s|y|n|t|a|x| |c|o|m@1|a|n|d|s| +0#0000000&@7
|
||||
@75
|
||||
|f+0#af5f00255&|u|n|c|t|i|o|n|!| +0#0000000&|s+0#e000e06&|:|C+0#0000000&|o|n|t|a|i|n|e|d|G|r|o|u|p|(+0#e000e06&|)| +0#0000000&@46
|
||||
| +0#0000e05&@1|"| |.@2| +0#0000000&@67
|
||||
@2|"+0#0000e05&| |.@2| +0#0000000&@67
|
||||
@2|f+0#af5f00255&|o|r| +0#0000000&|c+0#00e0e07&|l|u|s|t|e|r| +0#0000000&|i+0#af5f00255&|n| +0#0000000&|[|'+0#e000002&|m|a|r|k|d|o|w|n|H|i|g|h|l|i|g|h|t|_|z|s|h|'|,+0#0000000&| |'+0#e000002&|z|s|h|'|]+0#0000000&| @25
|
||||
| +0#0000e05&@3|"| |.@2| +0#0000000&@65
|
||||
@4|"+0#0000e05&| |.@2| +0#0000000&@65
|
||||
@2|e+0#af5f00255&|n|d|f|o|r| +0#0000000&@66
|
||||
| +0#0000e05&@1|"| |.@2| +0#0000000&@67
|
||||
@2|"+0#0000e05&| |.@2| +0#0000000&@67
|
||||
>e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
|
||||
@57|1|7@1|,|1| @8|B|o|t|
|
||||
|
@ -9,11 +9,11 @@
|
||||
@6|\+0#e000e06&|}| +0#0000000&@66
|
||||
@75
|
||||
|l+0#af5f00255&|e|t| +0#0000000&|a+0#00e0e07&|r@1|a|y| +0#0000000&|=+0#af5f00255&| +0#0000000&|[| @61
|
||||
| +0#0000e05&@5|"|\| |e|l|e|m|e|n|t| |1| +0#0000000&@56
|
||||
@6|"+0#0000e05&|\| |e|l|e|m|e|n|t| |1| +0#0000000&@56
|
||||
@6|\+0#e000e06&| +0#0000000&|1+0#e000002&|,+0#0000000&| @64
|
||||
| +0#0000e05&@5|"|\| |e|l|e|m|e|n|t| |2| +0#0000000&@56
|
||||
@6|"+0#0000e05&|\| |e|l|e|m|e|n|t| |2| +0#0000000&@56
|
||||
@6|\+0#e000e06&| +0#0000000&|2+0#e000002&|,+0#0000000&| @64
|
||||
| +0#0000e05&@5|"|\| |e|l|e|m|e|n|t| |3| +0#0000000&@56
|
||||
@6|"+0#0000e05&|\| |e|l|e|m|e|n|t| |3| +0#0000000&@56
|
||||
@6|\+0#e000e06&| +0#0000000&|3+0#e000002&| +0#0000000&@65
|
||||
@6|\+0#e000e06&|]+0#0000000&| @66
|
||||
|~+0#4040ff13&| @73
|
||||
|
@ -10,11 +10,11 @@
|
||||
@6|\+0#e000e06&|}| +0#0000000&@66
|
||||
@75
|
||||
|l+0#af5f00255&|e|t| +0#0000000&|a+0#00e0e07&|r@1|a|y| +0#0000000&|=+0#af5f00255&| +0#0000000&|[| @61
|
||||
| +0#0000e05&@5|"|\| |e|l|e|m|e|n|t| |1| +0#0000000&@56
|
||||
@6|"+0#0000e05&|\| |e|l|e|m|e|n|t| |1| +0#0000000&@56
|
||||
@6|\+0#e000e06&| +0#0000000&|1+0#e000002&|,+0#0000000&| @64
|
||||
| +0#0000e05&@5|"|\| |e|l|e|m|e|n|t| |2| +0#0000000&@56
|
||||
@6|"+0#0000e05&|\| |e|l|e|m|e|n|t| |2| +0#0000000&@56
|
||||
@6|\+0#e000e06&| +0#0000000&|2+0#e000002&|,+0#0000000&| @64
|
||||
| +0#0000e05&@5|"|\| |e|l|e|m|e|n|t| |3| +0#0000000&@56
|
||||
@6|"+0#0000e05&|\| |e|l|e|m|e|n|t| |3| +0#0000000&@56
|
||||
@6|\+0#e000e06&| +0#0000000&|3+0#e000002&| +0#0000000&@65
|
||||
@6>\+0#e000e06&|]+0#0000000&| @66
|
||||
@57|4|9|,|7| @9|B|o|t|
|
||||
|
@ -28,6 +28,29 @@ autocmd BufNewFile * {
|
||||
}
|
||||
|
||||
|
||||
# Multiline comments
|
||||
|
||||
# comment
|
||||
\ continuing comment
|
||||
\ continuing comment
|
||||
|
||||
# :Foo
|
||||
\ arg1
|
||||
#\ comment
|
||||
\ arg2
|
||||
|
||||
echo "TOP"
|
||||
|
||||
|
||||
# Line-continuation comments
|
||||
|
||||
:Foo
|
||||
#\ line continuation comment
|
||||
\ arg1
|
||||
#\ line continuation comment
|
||||
\ arg2
|
||||
|
||||
|
||||
# Issue: #13047
|
||||
|
||||
if !exists(":DiffOrig")
|
@ -25,6 +25,29 @@ autocmd BufNewFile * {
|
||||
}
|
||||
|
||||
|
||||
" Multiline comments
|
||||
|
||||
" comment
|
||||
\ continuing comment
|
||||
\ continuing comment
|
||||
|
||||
" :Foo
|
||||
\ arg1
|
||||
"\ comment
|
||||
\ arg2
|
||||
|
||||
echo "TOP"
|
||||
|
||||
|
||||
" Line-continuation comments
|
||||
|
||||
:Foo
|
||||
"\ line continuation comment
|
||||
\ arg1
|
||||
"\ line continuation comment
|
||||
\ arg2
|
||||
|
||||
|
||||
" Issue: #13047
|
||||
|
||||
if !exists(":DiffOrig")
|
@ -3,7 +3,7 @@
|
||||
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" URL: https://github.com/vim-jp/syntax-vim-ex
|
||||
" Last Change: 2024 Jun 05
|
||||
" Last Change: 2024 Jun 11
|
||||
" Former Maintainer: Charles E. Campbell
|
||||
|
||||
" DO NOT CHANGE DIRECTLY.
|
||||
@ -857,16 +857,17 @@ syn match vimCtrlChar "[--]"
|
||||
" Beginners - Patterns that involve ^ {{{2
|
||||
" =========
|
||||
if s:vim9script
|
||||
syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle contained
|
||||
syn match vim9LineComment +^[ \t:]*#.*$+ contains=@vimCommentGroup,vimCommentString,vim9CommentTitle
|
||||
syn region vim9LineComment start=+^[ \t:]*\zs#.*$+ skip=+\n\s*\\\|\n\s*#\\ + end="$" contains=@vimCommentGroup,vimCommentString,vim9CommentTitle
|
||||
syn region vimLineComment start=+^[ \t:]*\zs".*$+ skip=+\n\s*\\\|\n\s*"\\ + end="$" contains=@vimCommentGroup,vimCommentString,vimCommentTitle contained
|
||||
else
|
||||
syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
|
||||
syn match vim9LineComment +^[ \t:]*#.*$+ contains=@vimCommentGroup,vimCommentString,vim9CommentTitle contained
|
||||
syn region vimLineComment start=+^[ \t:]*\zs".*$+ skip=+\n\s*\\\|\n\s*"\\ + end="$" contains=@vimCommentGroup,vimCommentString,vimCommentTitle
|
||||
syn region vim9LineComment start=+^[ \t:]*\zs#.*$+ skip=+\n\s*\\\|\n\s*#\\ + end="$" contains=@vimCommentGroup,vimCommentString,vim9CommentTitle contained
|
||||
endif
|
||||
syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
|
||||
syn match vim9CommentTitle '#\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vim9CommentTitleLeader,vimTodo,@vimCommentGroup
|
||||
|
||||
syn match vimContinue "^\s*\zs\\"
|
||||
syn match vimContinueComment '^\s*\zs["#]\\ .*' contained
|
||||
syn match vimContinueComment '^\s*\zs["#]\\ .*'
|
||||
syn cluster vimContinue contains=vimContinue,vimContinueComment
|
||||
syn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue
|
||||
syn match vimCommentTitleLeader '"\s\+'ms=s+1 contained
|
||||
|
Reference in New Issue
Block a user