diff options
author | dkearns <dougkearns@gmail.com> | 2024-02-28 05:59:30 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-27 19:59:30 +0100 |
commit | b1427b46f5fe50a1daba102c4017d0ef2624b3ba (patch) | |
tree | cdf523c9a0acb5bc65da8e66bdf49661f69799ea /runtime/syntax/testdir | |
parent | c7ddc9b73543d4b3b906b56948dc9a6861150e12 (diff) |
runtime(vim): Update base-syntax, improve :echo highlighting (#14103)
- Normalise behaviour of :echo commands and improve expression matching.
- Allow continued argument lines.
- Refine string interpolation groups.
- Remove duplicated :menu and :map generated commands that are handled
specially later in the file.
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/syntax/testdir')
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_ex_echo_00.dump | 20 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_ex_echo_99.dump | 20 | ||||
-rw-r--r-- | runtime/syntax/testdir/input/vim_ex_echo.vim | 20 |
3 files changed, 60 insertions, 0 deletions
diff --git a/runtime/syntax/testdir/dumps/vim_ex_echo_00.dump b/runtime/syntax/testdir/dumps/vim_ex_echo_00.dump new file mode 100644 index 0000000000..506c9e2d87 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_echo_00.dump @@ -0,0 +1,20 @@ +>"+0#0000e05#ffffff0| |V|i|m| |:|e|c|h|o| |c|o|m@1|a|n|d|s| +0#0000000&@54 +@75 +|e+0#af5f00255&|c|h|o| +0#0000000&@7|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48 +|e+0#af5f00255&|c|h|o|n| +0#0000000&@6|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48 +|e+0#af5f00255&|c|h|o|m|s|g| +0#0000000&@4|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48 +|e+0#af5f00255&|c|h|o|w|i|n|d|o|w| +0#0000000&@1|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48 +|e+0#af5f00255&|c|h|o|e|r@1| +0#0000000&@4|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48 +|e+0#af5f00255&|c|h|o|c|o|n|s|o|l|e| +0#0000000&|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48 +@75 +|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |i|s| |:|||"| +0#0000000&||| ||| @40 +@75 +|e+0#af5f00255&|c|h|o|h|l| +0#0000000&|W+0#00e0003&|a|r|n|i|n|g|M|s|g| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|D|o|n|'|t| |p|a|n|i|c|!|"| +0#0000000&||| |e+0#af5f00255&|c|h|o|h|l| +0#0000000&|N+0#00e0003&|o|n|e| +0#0000000&@21 +@75 +|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&@58 +@5|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|4+0#e000002&|2| +0#0000000&@64 +@75 +|"+0#0000e05&| |:|e|c|h|o| |w|i|t|h|o|u|t| |{|e|x|p|r|}| +0#0000000&@52 +|e+0#af5f00255&|c|h|o||+0#0000000&| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@58 +|"|i|n|p|u|t|/|v|i|m|_|e|x|_|e|c|h|o|.|v|i|m|"| |2|0|L|,| |3|6|2|B| @23|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/vim_ex_echo_99.dump b/runtime/syntax/testdir/dumps/vim_ex_echo_99.dump new file mode 100644 index 0000000000..e8dd4541bc --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_echo_99.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@74 +|e+0#af5f00255&|c|h|o| +0#0000000&@7|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48 +|e+0#af5f00255&|c|h|o|n| +0#0000000&@6|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48 +|e+0#af5f00255&|c|h|o|m|s|g| +0#0000000&@4|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48 +|e+0#af5f00255&|c|h|o|w|i|n|d|o|w| +0#0000000&@1|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48 +|e+0#af5f00255&|c|h|o|e|r@1| +0#0000000&@4|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48 +|e+0#af5f00255&|c|h|o|c|o|n|s|o|l|e| +0#0000000&|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48 +@75 +|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |i|s| |:|||"| +0#0000000&||| ||| @40 +@75 +|e+0#af5f00255&|c|h|o|h|l| +0#0000000&|W+0#00e0003&|a|r|n|i|n|g|M|s|g| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|D|o|n|'|t| |p|a|n|i|c|!|"| +0#0000000&||| |e+0#af5f00255&|c|h|o|h|l| +0#0000000&|N+0#00e0003&|o|n|e| +0#0000000&@21 +@75 +|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&@58 +@5|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|4+0#e000002&|2| +0#0000000&@64 +@75 +|"+0#0000e05&| |:|e|c|h|o| |w|i|t|h|o|u|t| |{|e|x|p|r|}| +0#0000000&@52 +|e+0#af5f00255&|c|h|o||+0#0000000&| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@58 +> @74 +@57|2|0|,|0|-|1| @7|B|o|t| diff --git a/runtime/syntax/testdir/input/vim_ex_echo.vim b/runtime/syntax/testdir/input/vim_ex_echo.vim new file mode 100644 index 0000000000..c031724b8a --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_echo.vim @@ -0,0 +1,20 @@ +" Vim :echo commands + +echo "Answer = " 42 +echon "Answer = " 42 +echomsg "Answer = " 42 +echowindow "Answer = " 42 +echoerr "Answer = " 42 +echoconsole "Answer = " 42 + +echo "following command is :|" | | + +echohl WarningMsg | echo "Don't panic!" | echohl None + +echo "Answer = " + "\ comment + \ 42 + +" :echo without {expr} +echo| echo "Foo" + |