runtime(vim): Update base-syntax, configurable comment string highlighting (#14931)
Allow highlighting of strings within comments to be disabled by setting g:vimsyn_comment_strings to false. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@ -369,7 +369,9 @@ syn region vimUserCmdBlock contained matchgroup=vimSep start="{" end="}" contain
|
||||
|
||||
" Lower Priority Comments: after some vim commands... {{{2
|
||||
" =======================
|
||||
syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"'
|
||||
if get(g:, "vimsyn_comment_strings", 1)
|
||||
syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"'
|
||||
endif
|
||||
|
||||
if s:vim9script
|
||||
syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString contained
|
||||
|
||||
20
runtime/syntax/testdir/dumps/vim9_ex_comment_strings_00.dump
Normal file
20
runtime/syntax/testdir/dumps/vim9_ex_comment_strings_00.dump
Normal file
@ -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|t|r|i|n|g|s| +0#0000000&@53
|
||||
|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|v|i|m|s|y|n|_|c|o|m@1|e|n|t|_|s|t|r|i|n|g|s| |=| |v|:|t|r|u|e| +0#0000000&@20
|
||||
@75
|
||||
|#+0#0000e05&| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@55
|
||||
@75
|
||||
|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
|
||||
| +0#0000e05&@1|"| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@53
|
||||
|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&@65
|
||||
| +0#0000e05&@1|#| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@53
|
||||
|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
|
||||
@75
|
||||
|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|F|o@1| |{+0#e000e06&| +0#0000000&@61
|
||||
| +0#0000e05&@1|#| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@53
|
||||
|}+0#e000e06&| +0#0000000&@73
|
||||
@75
|
||||
@57|1|,|1| @10|T|o|p|
|
||||
20
runtime/syntax/testdir/dumps/vim9_ex_comment_strings_01.dump
Normal file
20
runtime/syntax/testdir/dumps/vim9_ex_comment_strings_01.dump
Normal file
@ -0,0 +1,20 @@
|
||||
|e+0#af5f00255#ffffff0|n|d@1|e|f| +0#0000000&@68
|
||||
@75
|
||||
|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|F|o@1| |{+0#e000e06&| +0#0000000&@61
|
||||
| +0#0000e05&@1|#| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@53
|
||||
|}+0#e000e06&| +0#0000000&@73
|
||||
> @74
|
||||
|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|#| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@53
|
||||
|}+0#e000e06&| +0#0000000&@73
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|1|9|,|0|-|1| @7|B|o|t|
|
||||
20
runtime/syntax/testdir/dumps/vim9_ex_comment_strings_99.dump
Normal file
20
runtime/syntax/testdir/dumps/vim9_ex_comment_strings_99.dump
Normal file
@ -0,0 +1,20 @@
|
||||
|#+0#0000e05#ffffff0| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|v|i|m|s|y|n|_|c|o|m@1|e|n|t|_|s|t|r|i|n|g|s| |=| |v|:|t|r|u|e| +0#0000000&@20
|
||||
@75
|
||||
|#+0#0000e05&| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@55
|
||||
@75
|
||||
|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
|
||||
| +0#0000e05&@1|"| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@53
|
||||
|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&@65
|
||||
| +0#0000e05&@1|#| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@53
|
||||
|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
|
||||
@75
|
||||
|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|F|o@1| |{+0#e000e06&| +0#0000000&@61
|
||||
| +0#0000e05&@1|#| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@53
|
||||
|}+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|#| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@53
|
||||
>}+0#e000e06&| +0#0000000&@73
|
||||
@57|2@1|,|1| @9|B|o|t|
|
||||
@ -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|t|r|i|n|g|s| +0#0000000&@53
|
||||
|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|v|i|m|s|y|n|_|c|o|m@1|e|n|t|_|s|t|r|i|n|g|s| |=| |v|:|f|a|l|s|e| +0#0000000&@19
|
||||
@75
|
||||
|#+0#0000e05&| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@55
|
||||
@75
|
||||
|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
|
||||
| +0#0000e05&@1|"| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@53
|
||||
|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&@65
|
||||
| +0#0000e05&@1|#| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@53
|
||||
|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
|
||||
@75
|
||||
|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|F|o@1| |{+0#e000e06&| +0#0000000&@61
|
||||
| +0#0000e05&@1|#| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@53
|
||||
|}+0#e000e06&| +0#0000000&@73
|
||||
@75
|
||||
@57|1|,|1| @10|T|o|p|
|
||||
@ -0,0 +1,20 @@
|
||||
|e+0#af5f00255#ffffff0|n|d@1|e|f| +0#0000000&@68
|
||||
@75
|
||||
|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|F|o@1| |{+0#e000e06&| +0#0000000&@61
|
||||
| +0#0000e05&@1|#| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@53
|
||||
|}+0#e000e06&| +0#0000000&@73
|
||||
> @74
|
||||
|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|#| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@53
|
||||
|}+0#e000e06&| +0#0000000&@73
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|1|9|,|0|-|1| @7|B|o|t|
|
||||
@ -0,0 +1,20 @@
|
||||
|#+0#0000e05#ffffff0| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|v|i|m|s|y|n|_|c|o|m@1|e|n|t|_|s|t|r|i|n|g|s| |=| |v|:|f|a|l|s|e| +0#0000000&@19
|
||||
@75
|
||||
|#+0#0000e05&| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@55
|
||||
@75
|
||||
|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
|
||||
| +0#0000e05&@1|"| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@53
|
||||
|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&@65
|
||||
| +0#0000e05&@1|#| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@53
|
||||
|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
|
||||
@75
|
||||
|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|F|o@1| |{+0#e000e06&| +0#0000000&@61
|
||||
| +0#0000e05&@1|#| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@53
|
||||
|}+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|#| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@53
|
||||
>}+0#e000e06&| +0#0000000&@73
|
||||
@57|2@1|,|1| @9|B|o|t|
|
||||
20
runtime/syntax/testdir/dumps/vim_ex_comment_strings_00.dump
Normal file
20
runtime/syntax/testdir/dumps/vim_ex_comment_strings_00.dump
Normal file
@ -0,0 +1,20 @@
|
||||
>"+0#0000e05#ffffff0| |V|i|m| |c|o|m@1|e|n|t| |s|t|r|i|n|g|s| +0#0000000&@53
|
||||
|"+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|v|i|m|s|y|n|_|c|o|m@1|e|n|t|_|s|t|r|i|n|g|s| |=| |v|:|t|r|u|e| +0#0000000&@20
|
||||
@75
|
||||
|"+0#0000e05&| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@55
|
||||
@75
|
||||
|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
|
||||
| +0#0000e05&@1|"| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@53
|
||||
|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&@65
|
||||
| +0#0000e05&@1|#| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@53
|
||||
|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
|
||||
@75
|
||||
|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|F|o@1| |{+0#e000e06&| +0#0000000&@61
|
||||
| +0#0000e05&@1|#| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@53
|
||||
|}+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|#| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@53
|
||||
@57|1|,|1| @10|T|o|p|
|
||||
20
runtime/syntax/testdir/dumps/vim_ex_comment_strings_99.dump
Normal file
20
runtime/syntax/testdir/dumps/vim_ex_comment_strings_99.dump
Normal file
@ -0,0 +1,20 @@
|
||||
|"+0#0000e05#ffffff0| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|v|i|m|s|y|n|_|c|o|m@1|e|n|t|_|s|t|r|i|n|g|s| |=| |v|:|t|r|u|e| +0#0000000&@20
|
||||
@75
|
||||
|"+0#0000e05&| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@55
|
||||
@75
|
||||
|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
|
||||
| +0#0000e05&@1|"| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@53
|
||||
|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&@65
|
||||
| +0#0000e05&@1|#| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@53
|
||||
|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
|
||||
@75
|
||||
|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|F|o@1| |{+0#e000e06&| +0#0000000&@61
|
||||
| +0#0000e05&@1|#| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@53
|
||||
|}+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|#| |p|r|e| |"+0#e000002&|s|t|r|i|n|g|"| +0#0000e05&|p|o|s|t| +0#0000000&@53
|
||||
>}+0#e000e06&| +0#0000000&@73
|
||||
@57|2|0|,|1| @9|B|o|t|
|
||||
@ -0,0 +1,20 @@
|
||||
>"+0#0000e05#ffffff0| |V|i|m| |c|o|m@1|e|n|t| |s|t|r|i|n|g|s| +0#0000000&@53
|
||||
|"+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|v|i|m|s|y|n|_|c|o|m@1|e|n|t|_|s|t|r|i|n|g|s| |=| |v|:|f|a|l|s|e| +0#0000000&@19
|
||||
@75
|
||||
|"+0#0000e05&| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@55
|
||||
@75
|
||||
|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
|
||||
| +0#0000e05&@1|"| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@53
|
||||
|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&@65
|
||||
| +0#0000e05&@1|#| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@53
|
||||
|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
|
||||
@75
|
||||
|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|F|o@1| |{+0#e000e06&| +0#0000000&@61
|
||||
| +0#0000e05&@1|#| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@53
|
||||
|}+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|#| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@53
|
||||
@57|1|,|1| @10|T|o|p|
|
||||
@ -0,0 +1,20 @@
|
||||
|"+0#0000e05#ffffff0| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|v|i|m|s|y|n|_|c|o|m@1|e|n|t|_|s|t|r|i|n|g|s| |=| |v|:|f|a|l|s|e| +0#0000000&@19
|
||||
@75
|
||||
|"+0#0000e05&| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@55
|
||||
@75
|
||||
|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
|
||||
| +0#0000e05&@1|"| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@53
|
||||
|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&@65
|
||||
| +0#0000e05&@1|#| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@53
|
||||
|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
|
||||
@75
|
||||
|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|F|o@1| |{+0#e000e06&| +0#0000000&@61
|
||||
| +0#0000e05&@1|#| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@53
|
||||
|}+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|#| |p|r|e| |"|s|t|r|i|n|g|"| |p|o|s|t| +0#0000000&@53
|
||||
>}+0#e000e06&| +0#0000000&@73
|
||||
@57|2|0|,|1| @9|B|o|t|
|
||||
22
runtime/syntax/testdir/input/vim9_ex_comment_strings.vim
Normal file
22
runtime/syntax/testdir/input/vim9_ex_comment_strings.vim
Normal file
@ -0,0 +1,22 @@
|
||||
vim9script
|
||||
|
||||
# Vim comment strings
|
||||
# VIM_TEST_SETUP let g:vimsyn_comment_strings = v:true
|
||||
|
||||
# pre "string" post
|
||||
|
||||
function Foo()
|
||||
" pre "string" post
|
||||
endfunction
|
||||
|
||||
def Bar()
|
||||
# pre "string" post
|
||||
enddef
|
||||
|
||||
command Foo {
|
||||
# pre "string" post
|
||||
}
|
||||
|
||||
autocmd BufNewFile * {
|
||||
# pre "string" post
|
||||
}
|
||||
22
runtime/syntax/testdir/input/vim9_ex_no_comment_strings.vim
Normal file
22
runtime/syntax/testdir/input/vim9_ex_no_comment_strings.vim
Normal file
@ -0,0 +1,22 @@
|
||||
vim9script
|
||||
|
||||
# Vim comment strings
|
||||
# VIM_TEST_SETUP let g:vimsyn_comment_strings = v:false
|
||||
|
||||
# pre "string" post
|
||||
|
||||
function Foo()
|
||||
" pre "string" post
|
||||
endfunction
|
||||
|
||||
def Bar()
|
||||
# pre "string" post
|
||||
enddef
|
||||
|
||||
command Foo {
|
||||
# pre "string" post
|
||||
}
|
||||
|
||||
autocmd BufNewFile * {
|
||||
# pre "string" post
|
||||
}
|
||||
20
runtime/syntax/testdir/input/vim_ex_comment_strings.vim
Normal file
20
runtime/syntax/testdir/input/vim_ex_comment_strings.vim
Normal file
@ -0,0 +1,20 @@
|
||||
" Vim comment strings
|
||||
" VIM_TEST_SETUP let g:vimsyn_comment_strings = v:true
|
||||
|
||||
" pre "string" post
|
||||
|
||||
function Foo()
|
||||
" pre "string" post
|
||||
endfunction
|
||||
|
||||
def Bar()
|
||||
# pre "string" post
|
||||
enddef
|
||||
|
||||
command Foo {
|
||||
# pre "string" post
|
||||
}
|
||||
|
||||
autocmd BufNewFile * {
|
||||
# pre "string" post
|
||||
}
|
||||
20
runtime/syntax/testdir/input/vim_ex_no_comment_strings.vim
Normal file
20
runtime/syntax/testdir/input/vim_ex_no_comment_strings.vim
Normal file
@ -0,0 +1,20 @@
|
||||
" Vim comment strings
|
||||
" VIM_TEST_SETUP let g:vimsyn_comment_strings = v:false
|
||||
|
||||
" pre "string" post
|
||||
|
||||
function Foo()
|
||||
" pre "string" post
|
||||
endfunction
|
||||
|
||||
def Bar()
|
||||
# pre "string" post
|
||||
enddef
|
||||
|
||||
command Foo {
|
||||
# pre "string" post
|
||||
}
|
||||
|
||||
autocmd BufNewFile * {
|
||||
# pre "string" post
|
||||
}
|
||||
@ -408,7 +408,9 @@ syn region vimUserCmdBlock contained matchgroup=vimSep start="{" end="}" contain
|
||||
|
||||
" Lower Priority Comments: after some vim commands... {{{2
|
||||
" =======================
|
||||
syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"'
|
||||
if get(g:, "vimsyn_comment_strings", 1)
|
||||
syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"'
|
||||
endif
|
||||
|
||||
if s:vim9script
|
||||
syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString contained
|
||||
|
||||
Reference in New Issue
Block a user