From 059cbe8933550e4f2b10ab564fb4398e95280198 Mon Sep 17 00:00:00 2001 From: dkearns Date: Wed, 12 Jun 2024 03:27:53 +1000 Subject: 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 Signed-off-by: Christian Brabandt --- runtime/syntax/generator/vim.vim.base | 13 +++-- runtime/syntax/testdir/dumps/vim9_comment_00.dump | 20 +++++++ runtime/syntax/testdir/dumps/vim9_comment_01.dump | 20 +++++++ runtime/syntax/testdir/dumps/vim9_comment_02.dump | 20 +++++++ runtime/syntax/testdir/dumps/vim9_comment_03.dump | 20 +++++++ runtime/syntax/testdir/dumps/vim9_comment_99.dump | 20 +++++++ .../testdir/dumps/vim9_legacy_header_00.dump | 2 +- .../testdir/dumps/vim9_legacy_header_99.dump | 2 +- .../testdir/dumps/vim9_legacy_header_fold_00.dump | 2 +- .../testdir/dumps/vim9_legacy_header_fold_99.dump | 2 +- runtime/syntax/testdir/dumps/vim_comment_00.dump | 20 +++++++ runtime/syntax/testdir/dumps/vim_comment_01.dump | 20 +++++++ runtime/syntax/testdir/dumps/vim_comment_02.dump | 20 +++++++ runtime/syntax/testdir/dumps/vim_comment_03.dump | 20 +++++++ runtime/syntax/testdir/dumps/vim_comment_99.dump | 20 +++++++ .../testdir/dumps/vim_ex_comment-vim9_00.dump | 20 ------- .../testdir/dumps/vim_ex_comment-vim9_01.dump | 20 ------- .../testdir/dumps/vim_ex_comment-vim9_02.dump | 20 ------- .../testdir/dumps/vim_ex_comment-vim9_99.dump | 20 ------- .../syntax/testdir/dumps/vim_ex_comment_00.dump | 20 ------- .../syntax/testdir/dumps/vim_ex_comment_01.dump | 20 ------- .../syntax/testdir/dumps/vim_ex_comment_02.dump | 20 ------- .../syntax/testdir/dumps/vim_ex_comment_99.dump | 20 ------- .../syntax/testdir/dumps/vim_ex_function_07.dump | 2 +- .../syntax/testdir/dumps/vim_ex_function_09.dump | 2 +- .../syntax/testdir/dumps/vim_ex_function_99.dump | 2 +- runtime/syntax/testdir/dumps/vim_ex_syntax_09.dump | 6 +- runtime/syntax/testdir/dumps/vim_ex_syntax_99.dump | 6 +- .../testdir/dumps/vim_line_continuation_02.dump | 6 +- .../testdir/dumps/vim_line_continuation_99.dump | 6 +- runtime/syntax/testdir/input/vim9_comment.vim | 64 ++++++++++++++++++++ runtime/syntax/testdir/input/vim_comment.vim | 68 ++++++++++++++++++++++ .../syntax/testdir/input/vim_ex_comment-vim9.vim | 41 ------------- runtime/syntax/testdir/input/vim_ex_comment.vim | 45 -------------- runtime/syntax/vim.vim | 13 +++-- 35 files changed, 365 insertions(+), 277 deletions(-) create mode 100644 runtime/syntax/testdir/dumps/vim9_comment_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_comment_01.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_comment_02.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_comment_03.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_comment_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim_comment_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_comment_01.dump create mode 100644 runtime/syntax/testdir/dumps/vim_comment_02.dump create mode 100644 runtime/syntax/testdir/dumps/vim_comment_03.dump create mode 100644 runtime/syntax/testdir/dumps/vim_comment_99.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment-vim9_00.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment-vim9_01.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment-vim9_02.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment-vim9_99.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment_00.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment_01.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment_02.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment_99.dump create mode 100644 runtime/syntax/testdir/input/vim9_comment.vim create mode 100644 runtime/syntax/testdir/input/vim_comment.vim delete mode 100644 runtime/syntax/testdir/input/vim_ex_comment-vim9.vim delete mode 100644 runtime/syntax/testdir/input/vim_ex_comment.vim diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base index c3065b87bf..42c93dc5bf 100644 --- a/runtime/syntax/generator/vim.vim.base +++ b/runtime/syntax/generator/vim.vim.base @@ -3,7 +3,7 @@ " Maintainer: Hirohito Higashi " Doug Kearns " 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 diff --git a/runtime/syntax/testdir/dumps/vim9_comment_00.dump b/runtime/syntax/testdir/dumps/vim9_comment_00.dump new file mode 100644 index 0000000000..46d283f6ee --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim9_comment_00.dump @@ -0,0 +1,20 @@ +>v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&@64 +@75 +|#+0#0000e05&| |V|i|m| |c|o|m@1|e|n|t|s| +0#0000000&@60 +@75 +|#+0#0000e05&| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@53 +@75 +@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 +@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 +@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 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/vim9_comment_01.dump b/runtime/syntax/testdir/dumps/vim9_comment_01.dump new file mode 100644 index 0000000000..d59620862a --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim9_comment_01.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@74 +|d+0#af5f00255&|e|f|!| +0#0000000&|B|a|r|(+0#e000e06&|)| +0#0000000&@64 +@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 +@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 +@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&| |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|2|8|%| diff --git a/runtime/syntax/testdir/dumps/vim9_comment_02.dump b/runtime/syntax/testdir/dumps/vim9_comment_02.dump new file mode 100644 index 0000000000..e6a4de5391 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim9_comment_02.dump @@ -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|%| diff --git a/runtime/syntax/testdir/dumps/vim9_comment_03.dump b/runtime/syntax/testdir/dumps/vim9_comment_03.dump new file mode 100644 index 0000000000..0e424aba38 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim9_comment_03.dump @@ -0,0 +1,20 @@ +| +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 +@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 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|5@1|,|0|-|1| @7|B|o|t| diff --git a/runtime/syntax/testdir/dumps/vim9_comment_99.dump b/runtime/syntax/testdir/dumps/vim9_comment_99.dump new file mode 100644 index 0000000000..bed55bc1bd --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim9_comment_99.dump @@ -0,0 +1,20 @@ +| +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 +@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#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 +@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 +@57|6|4|,|1| @9|B|o|t| diff --git a/runtime/syntax/testdir/dumps/vim9_legacy_header_00.dump b/runtime/syntax/testdir/dumps/vim9_legacy_header_00.dump index 2f682d960b..a5f1802f97 100644 --- a/runtime/syntax/testdir/dumps/vim9_legacy_header_00.dump +++ b/runtime/syntax/testdir/dumps/vim9_legacy_header_00.dump @@ -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 diff --git a/runtime/syntax/testdir/dumps/vim9_legacy_header_99.dump b/runtime/syntax/testdir/dumps/vim9_legacy_header_99.dump index d400e3166d..27ff90e4e7 100644 --- a/runtime/syntax/testdir/dumps/vim9_legacy_header_99.dump +++ b/runtime/syntax/testdir/dumps/vim9_legacy_header_99.dump @@ -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 diff --git a/runtime/syntax/testdir/dumps/vim9_legacy_header_fold_00.dump b/runtime/syntax/testdir/dumps/vim9_legacy_header_fold_00.dump index b324c468b1..fe8e737ae8 100644 --- a/runtime/syntax/testdir/dumps/vim9_legacy_header_fold_00.dump +++ b/runtime/syntax/testdir/dumps/vim9_legacy_header_fold_00.dump @@ -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 diff --git a/runtime/syntax/testdir/dumps/vim9_legacy_header_fold_99.dump b/runtime/syntax/testdir/dumps/vim9_legacy_header_fold_99.dump index b3fa847003..fe339c4f90 100644 --- a/runtime/syntax/testdir/dumps/vim9_legacy_header_fold_99.dump +++ b/runtime/syntax/testdir/dumps/vim9_legacy_header_fold_99.dump @@ -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 diff --git a/runtime/syntax/testdir/dumps/vim_comment_00.dump b/runtime/syntax/testdir/dumps/vim_comment_00.dump new file mode 100644 index 0000000000..335fc3f16d --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_comment_00.dump @@ -0,0 +1,20 @@ +>"+0#0000e05#ffffff0| |V|i|m| |c|o|m@1|e|n|t|s| +0#0000000&@60 +@75 +|"+0#0000e05&| |L|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51 +@75 +|#| |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 +@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#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 +|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|-+0#af5f00255&|n+0#e000e06&|a|r|g|s|=+0#af5f00255&|1+0#00e0003&| +0#0000000&|F|o@1|C|o|m@1|a|n|d| |{+0#e000e06&| +0#0000000&@45 +| +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 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/vim_comment_01.dump b/runtime/syntax/testdir/dumps/vim_comment_01.dump new file mode 100644 index 0000000000..ebf0c42527 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_comment_01.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@1|"+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 +|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|-+0#af5f00255&|n+0#e000e06&|a|r|g|s|=+0#af5f00255&|1+0#00e0003&| +0#0000000&|F|o@1|C|o|m@1|a|n|d| |{+0#e000e06&| +0#0000000&@45 +| +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 +@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 +@75 +@75 +|"+0#0000e05&| |M|u|l|t|i|l|i|n|e| |c|o|m@1|e|n|t|s| +0#0000000&@54 +@75 +|"+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|%| diff --git a/runtime/syntax/testdir/dumps/vim_comment_02.dump b/runtime/syntax/testdir/dumps/vim_comment_02.dump new file mode 100644 index 0000000000..8e31fb6be5 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_comment_02.dump @@ -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|%| diff --git a/runtime/syntax/testdir/dumps/vim_comment_03.dump b/runtime/syntax/testdir/dumps/vim_comment_03.dump new file mode 100644 index 0000000000..2d40f6cc99 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_comment_03.dump @@ -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| diff --git a/runtime/syntax/testdir/dumps/vim_comment_99.dump b/runtime/syntax/testdir/dumps/vim_comment_99.dump new file mode 100644 index 0000000000..bb1fbb0e7d --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_comment_99.dump @@ -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|6|8|,|1| @9|B|o|t| diff --git a/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_00.dump b/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_00.dump deleted file mode 100644 index 57b021621b..0000000000 --- a/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_00.dump +++ /dev/null @@ -1,20 +0,0 @@ ->v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&@64 -@75 -|#+0#0000e05&| |V|i|m| |c|o|m@1|e|n|t|s| +0#0000000&@60 -@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#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|#| |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#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 -@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_01.dump b/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_01.dump deleted file mode 100644 index 1b0d7c9357..0000000000 --- a/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_01.dump +++ /dev/null @@ -1,20 +0,0 @@ -| +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#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#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#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 -@75 -@57|1|9|,|0|-|1| @7|5|9|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_02.dump b/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_02.dump deleted file mode 100644 index 7de6ffb978..0000000000 --- a/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_02.dump +++ /dev/null @@ -1,20 +0,0 @@ -| +0&#ffffff0@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 -|#+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 -|~+0#4040ff13&| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -| +0#0000000&@56|3|7|,|0|-|1| @7|B|o|t| diff --git a/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_99.dump b/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_99.dump deleted file mode 100644 index f8759da214..0000000000 --- a/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_99.dump +++ /dev/null @@ -1,20 +0,0 @@ -|}+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 -@75 -@75 -|#+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#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 -@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 -@57|4|1|,|1| @9|B|o|t| diff --git a/runtime/syntax/testdir/dumps/vim_ex_comment_00.dump b/runtime/syntax/testdir/dumps/vim_ex_comment_00.dump deleted file mode 100644 index a1c188092f..0000000000 --- a/runtime/syntax/testdir/dumps/vim_ex_comment_00.dump +++ /dev/null @@ -1,20 +0,0 @@ ->"+0#0000e05#ffffff0| |V|i|m| |c|o|m@1|e|n|t|s| +0#0000000&@60 -@75 -|"+0#0000e05&| |L|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51 -@75 -|#| |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|#| |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#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 -|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|-+0#af5f00255&|n+0#e000e06&|a|r|g|s|=+0#af5f00255&|1+0#00e0003&| +0#0000000&|F|o@1|C|o|m@1|a|n|d| |{+0#e000e06&| +0#0000000&@45 -| +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 -@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/vim_ex_comment_01.dump b/runtime/syntax/testdir/dumps/vim_ex_comment_01.dump deleted file mode 100644 index 513f64ca91..0000000000 --- a/runtime/syntax/testdir/dumps/vim_ex_comment_01.dump +++ /dev/null @@ -1,20 +0,0 @@ -| +0&#ffffff0@1|"+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 -|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|-+0#af5f00255&|n+0#e000e06&|a|r|g|s|=+0#af5f00255&|1+0#00e0003&| +0#0000000&|F|o@1|C|o|m@1|a|n|d| |{+0#e000e06&| +0#0000000&@45 -| +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 -@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 -@75 -@75 -|"+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 -@57|1|9|,|3| @9|5|0|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_comment_02.dump b/runtime/syntax/testdir/dumps/vim_ex_comment_02.dump deleted file mode 100644 index e2b6092a84..0000000000 --- a/runtime/syntax/testdir/dumps/vim_ex_comment_02.dump +++ /dev/null @@ -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| diff --git a/runtime/syntax/testdir/dumps/vim_ex_comment_99.dump b/runtime/syntax/testdir/dumps/vim_ex_comment_99.dump deleted file mode 100644 index e9bcabeb92..0000000000 --- a/runtime/syntax/testdir/dumps/vim_ex_comment_99.dump +++ /dev/null @@ -1,20 +0,0 @@ -| +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|#| +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 -@57|4|5|,|1| @9|B|o|t| diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_07.dump b/runtime/syntax/testdir/dumps/vim_ex_function_07.dump index 40b00b0f73..843884975d 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_function_07.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_function_07.dump @@ -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 diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_09.dump b/runtime/syntax/testdir/dumps/vim_ex_function_09.dump index 94f80daa93..4c2a626312 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_function_09.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_function_09.dump @@ -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 diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_99.dump b/runtime/syntax/testdir/dumps/vim_ex_function_99.dump index 7eed707ee4..b00e2ac194 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_function_99.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_function_99.dump @@ -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 diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_09.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_09.dump index ade5bd529d..5240e4edb0 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_syntax_09.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_09.dump @@ -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|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_99.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_99.dump index c1942c810c..c06ac66e7a 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_syntax_99.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_99.dump @@ -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| diff --git a/runtime/syntax/testdir/dumps/vim_line_continuation_02.dump b/runtime/syntax/testdir/dumps/vim_line_continuation_02.dump index c4ceded842..e18a56d4ce 100644 --- a/runtime/syntax/testdir/dumps/vim_line_continuation_02.dump +++ b/runtime/syntax/testdir/dumps/vim_line_continuation_02.dump @@ -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 diff --git a/runtime/syntax/testdir/dumps/vim_line_continuation_99.dump b/runtime/syntax/testdir/dumps/vim_line_continuation_99.dump index 05ea46454a..3e2c83d808 100644 --- a/runtime/syntax/testdir/dumps/vim_line_continuation_99.dump +++ b/runtime/syntax/testdir/dumps/vim_line_continuation_99.dump @@ -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| diff --git a/runtime/syntax/testdir/input/vim9_comment.vim b/runtime/syntax/testdir/input/vim9_comment.vim new file mode 100644 index 0000000000..fd6a5d2a2a --- /dev/null +++ b/runtime/syntax/testdir/input/vim9_comment.vim @@ -0,0 +1,64 @@ +vim9script + +# Vim comments + +# Vim9-script comment + + # string only recognised with leading char + "useless string" + +function! Foo() + " Legacy-script comment + # 42 " comment +endfunction + +def! Bar() + # Vim9-script comment + "useless string" # comment +enddef + +command -count FooCommand { + # Vim9-script comment + "useless string" # comment +} + +autocmd BufNewFile * { + # Vim9-script comment + "useless string" # comment +} + + +# 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") + command DiffOrig vert new | set bt=nofile | r ++edit %% | 0d_ | diffthis + \ | wincmd p | diffthis +endif + + +# Issue: #11307 and #11560 + +# This is what we call " blah diff --git a/runtime/syntax/testdir/input/vim_comment.vim b/runtime/syntax/testdir/input/vim_comment.vim new file mode 100644 index 0000000000..f382f8df79 --- /dev/null +++ b/runtime/syntax/testdir/input/vim_comment.vim @@ -0,0 +1,68 @@ +" Vim comments + +" Legacy-script comment + +# 42 " comment + +function! Foo() + " Legacy-script comment + # 42 " comment +endfunction + +def! Bar() + # Vim9-script comment + "useless string" # comment +enddef + +command -nargs=1 FooCommand { + # Vim9-script comment + "useless string" # comment +} + +autocmd BufNewFile * { + # Vim9-script comment + "useless string" # comment +} + + +" 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") + command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis + \ | wincmd p | diffthis +endif + + +" Issue: #11307 and #11560 + +" This is what we call " blah + + +" Issue # #9587 + +def CommentTitle() + # Title: ... +enddef diff --git a/runtime/syntax/testdir/input/vim_ex_comment-vim9.vim b/runtime/syntax/testdir/input/vim_ex_comment-vim9.vim deleted file mode 100644 index 786d11b43f..0000000000 --- a/runtime/syntax/testdir/input/vim_ex_comment-vim9.vim +++ /dev/null @@ -1,41 +0,0 @@ -vim9script - -# Vim comments - -# Vim9-script comment - - # string only recognised with leading char - "useless string" - -function! Foo() - " Legacy-script comment - # 42 " comment -endfunction - -def! Bar() - # Vim9-script comment - "useless string" # comment -enddef - -command -count FooCommand { - # Vim9-script comment - "useless string" # comment -} - -autocmd BufNewFile * { - # Vim9-script comment - "useless string" # comment -} - - -# Issue: #13047 - -if !exists(":DiffOrig") - command DiffOrig vert new | set bt=nofile | r ++edit %% | 0d_ | diffthis - \ | wincmd p | diffthis -endif - - -# Issue: #11307 and #11560 - -# This is what we call " blah diff --git a/runtime/syntax/testdir/input/vim_ex_comment.vim b/runtime/syntax/testdir/input/vim_ex_comment.vim deleted file mode 100644 index 54e514eaa3..0000000000 --- a/runtime/syntax/testdir/input/vim_ex_comment.vim +++ /dev/null @@ -1,45 +0,0 @@ -" Vim comments - -" Legacy-script comment - -# 42 " comment - -function! Foo() - " Legacy-script comment - # 42 " comment -endfunction - -def! Bar() - # Vim9-script comment - "useless string" # comment -enddef - -command -nargs=1 FooCommand { - # Vim9-script comment - "useless string" # comment -} - -autocmd BufNewFile * { - # Vim9-script comment - "useless string" # comment -} - - -" Issue: #13047 - -if !exists(":DiffOrig") - command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis - \ | wincmd p | diffthis -endif - - -" Issue: #11307 and #11560 - -" This is what we call " blah - - -" Issue # #9587 - -def CommentTitle() - # Title: ... -enddef diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 3892cf8afb..5ad4d00e3d 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -3,7 +3,7 @@ " Maintainer: Hirohito Higashi " Doug Kearns " 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 -- cgit v1.2.3