diff options
author | dkearns <dougkearns@gmail.com> | 2024-03-19 05:19:51 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-18 19:19:51 +0100 |
commit | 9530fe4f3a69c6bd11fc745d3b2d1667cdd0cf6d (patch) | |
tree | 1f5ed99d8d44b6f7ced1b2c6ff7e3919c7f532ec /runtime/syntax/testdir | |
parent | 0e17f7e97290f81ff55743ab5cdc69ef118be080 (diff) |
runtime(vim): Update base-syntax, improve :highlight command (#14228)
Improve :highlight command highlighting
- Use the same highlight groups for "default link" with and without
bang.
- Match some common line-continuation use.
- Match :hi clear variants.
- Highlight color-name values.
Resync vim.vim and generator/vim.vim.base.
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/syntax/testdir')
5 files changed, 135 insertions, 0 deletions
diff --git a/runtime/syntax/testdir/dumps/vim_ex_highlight_00.dump b/runtime/syntax/testdir/dumps/vim_ex_highlight_00.dump new file mode 100644 index 0000000000..7b0f19ffa6 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_highlight_00.dump @@ -0,0 +1,20 @@ +>"+0#0000e05#ffffff0| |V|i|m| |:|h|i|g|h|l|i|g|h|t| |c|o|m@1|a|n|d| +0#0000000&@50 +@75 +|"+0#0000e05&| |l|i|s|t| +0#0000000&@68 +|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&@65 +|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@57 +@75 +|"+0#0000e05&| |r|e|s|e|t| +0#0000000&@67 +|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|c+0#00e0003&|l|e|a|r| +0#0000000&@59 +@75 +|"+0#0000e05&| |d|i|s|a|b|l|e| +0#0000000&@65 +|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|c+0#00e0003&|l|e|a|r| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@51 +|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&|N+0#00e0003&|O|N|E| +0#0000000&@52 +@75 +|"+0#0000e05&| |a|d@1|/|m|o|d|i|f|y| +0#0000000&@62 +|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&|c+0#00e0003&|t|e|r|m|=+0#0000000&|u+0#e000e06&|n|d|e|r|l|i|n|e| +0#0000000&@41 +|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&|t+0#00e0003&|e|r|m|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&@39 +@75 +|"+0#0000e05&| |l|i|n|k| +0#0000000&@68 +|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|l+0#00e0003&|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@48 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/vim_ex_highlight_01.dump b/runtime/syntax/testdir/dumps/vim_ex_highlight_01.dump new file mode 100644 index 0000000000..95e478dee4 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_highlight_01.dump @@ -0,0 +1,20 @@ +|"+0#0000e05#ffffff0| |a|d@1|/|m|o|d|i|f|y| +0#0000000&@62 +|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&|c+0#00e0003&|t|e|r|m|=+0#0000000&|u+0#e000e06&|n|d|e|r|l|i|n|e| +0#0000000&@41 +|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&|t+0#00e0003&|e|r|m|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&@39 +@75 +|"+0#0000e05&| |l|i|n|k| +0#0000000&@68 +>h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|l+0#00e0003&|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@48 +|h+0#af5f00255&|i|g|h|l|i|g|h|t|!| +0#0000000&|l+0#00e0003&|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@47 +|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|l+0#00e0003&|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|N+0#00e0003&|O|N|E| +0#0000000&@51 +|h+0#af5f00255&|i|g|h|l|i|g|h|t|!| +0#0000000&|l+0#00e0003&|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|N+0#00e0003&|O|N|E| +0#0000000&@50 +@75 +|"+0#0000e05&| |d|e|f|a|u|l|t| |l|i|n|k| +0#0000000&@60 +|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| |l|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@40 +|h+0#af5f00255&|i|g|h|l|i|g|h|t|!| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| |l|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@39 +|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| |l|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|N+0#00e0003&|O|N|E| +0#0000000&@43 +|h+0#af5f00255&|i|g|h|l|i|g|h|t|!| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| |l|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|N+0#00e0003&|O|N|E| +0#0000000&@42 +@75 +@75 +|"+0#0000e05&| |l|i|n|e| |c|o|n|t|i|n|u|a|t|i|o|n| |a|n|d| |c|o|m@1|a|n|d| |s|e|p|a|r|a|t|o|r| +0#0000000&@33 +@75 +@57|1|9|,|1| @9|3|6|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_highlight_02.dump b/runtime/syntax/testdir/dumps/vim_ex_highlight_02.dump new file mode 100644 index 0000000000..38313aa429 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_highlight_02.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@74 +|h+0#af5f00255&|i| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@64 +@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58 +@6|\+0#e000e06&| +0#0000000&|t+0#00e0003&|e|r|m|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&@57 +@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58 +@6>\+0#e000e06&| +0#0000000&|c+0#00e0003&|t|e|r|m|f|g|=+0#0000000&|C+0#e000002&|y|a|n| +0#0000000&@54 +@6|\+0#e000e06&| +0#0000000&|g+0#00e0003&|u|i|f|g|=+0#0000000&|#+0#e000002&|8|0|a|0|f@1| +0#0000000&@53 +@6|\+0#e000e06&| +0#0000000&|g+0#00e0003&|u|i|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&@58 +@75 +|h+0#af5f00255&|i| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@64 +@6|\+0#e000e06&| +0#0000000&|t+0#00e0003&|e|r|m|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&@57 +@6|\+0#e000e06&| +0#0000000&|c+0#00e0003&|t|e|r|m|f|g|=+0#0000000&|C+0#e000002&|y|a|n| +0#0000000&@54 +@6|\+0#e000e06&| +0#0000000&|g+0#00e0003&|u|i|f|g|=+0#0000000&|#+0#e000002&|8|0|a|0|f@1| +0#0000000&@53 +@6|\+0#e000e06&| +0#0000000&|g+0#00e0003&|u|i|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@45 +@75 +|h+0#af5f00255&|i| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&|t+0#00e0003&|e|r|m|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&|c+0#00e0003&|t|e|r|m|f|g|=+0#0000000&|C+0#e000002&|y|a|n| +0#0000000&|g+0#00e0003&|u|i|f|g|=+0#0000000&|#+0#e000002&|8|0|a|0|f@1| +0#0000000&|g+0#00e0003&|u|i|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@5 +@75 +|h+0#af5f00255&|i| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| |l|i|n|k| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&@63 +@57|3|7|,|7| @9|8|6|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_highlight_99.dump b/runtime/syntax/testdir/dumps/vim_ex_highlight_99.dump new file mode 100644 index 0000000000..dbd86d43a5 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_highlight_99.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|c+0#00e0003&|t|e|r|m|f|g|=+0#0000000&|C+0#e000002&|y|a|n| +0#0000000&@54 +@6|\+0#e000e06&| +0#0000000&|g+0#00e0003&|u|i|f|g|=+0#0000000&|#+0#e000002&|8|0|a|0|f@1| +0#0000000&@53 +@6|\+0#e000e06&| +0#0000000&|g+0#00e0003&|u|i|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&@58 +@75 +|h+0#af5f00255&|i| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@64 +@6|\+0#e000e06&| +0#0000000&|t+0#00e0003&|e|r|m|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&@57 +@6|\+0#e000e06&| +0#0000000&|c+0#00e0003&|t|e|r|m|f|g|=+0#0000000&|C+0#e000002&|y|a|n| +0#0000000&@54 +@6|\+0#e000e06&| +0#0000000&|g+0#00e0003&|u|i|f|g|=+0#0000000&|#+0#e000002&|8|0|a|0|f@1| +0#0000000&@53 +@6|\+0#e000e06&| +0#0000000&|g+0#00e0003&|u|i|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@45 +@75 +|h+0#af5f00255&|i| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&|t+0#00e0003&|e|r|m|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&|c+0#00e0003&|t|e|r|m|f|g|=+0#0000000&|C+0#e000002&|y|a|n| +0#0000000&|g+0#00e0003&|u|i|f|g|=+0#0000000&|#+0#e000002&|8|0|a|0|f@1| +0#0000000&|g+0#00e0003&|u|i|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@5 +@75 +|h+0#af5f00255&|i| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| |l|i|n|k| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&@63 +@6|\+0#e000e06&| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@59 +@75 +|h+0#af5f00255&|i| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| |l|i|n|k| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&@63 +@6>\+0#e000e06&| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@46 +@57|5@1|,|7| @9|B|o|t| diff --git a/runtime/syntax/testdir/input/vim_ex_highlight.vim b/runtime/syntax/testdir/input/vim_ex_highlight.vim new file mode 100644 index 0000000000..e23968aa5c --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_highlight.vim @@ -0,0 +1,55 @@ +" Vim :highlight command + +" list +highlight +highlight Comment + +" reset +highlight clear + +" disable +highlight clear Comment +highlight Comment NONE + +" add/modify +highlight Comment cterm=underline +highlight default Comment term=bold + +" link +highlight link Foo Comment +highlight! link Foo Comment +highlight link Foo NONE +highlight! link Foo NONE + +" default link +highlight default link Foo Comment +highlight! default link Foo Comment +highlight default link Foo NONE +highlight! default link Foo NONE + + +" line continuation and command separator + +hi Comment + "\ comment + \ term=bold + "\ comment + \ ctermfg=Cyan + \ guifg=#80a0ff + \ gui=bold + +hi Comment + \ term=bold + \ ctermfg=Cyan + \ guifg=#80a0ff + \ gui=bold | echo "Foo" + +hi Comment term=bold ctermfg=Cyan guifg=#80a0ff gui=bold | echo "Foo" + +hi default link + \ Foo + \ Comment + +hi default link + \ Foo + \ Comment | echo "Foo" |