0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

runtime(vim): Update base-syntax, improve :set backslash handling

Improve backslash handling in :set option values. There is no special
handling for options supporting Windows path separators yet.

See :help option-backslash.

Remove the vimSetString syntax group. Option string values cannot be
specified with a quoted string, this is a command terminating tail
comment.

fixes: #16913
closes: #17034

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Doug Kearns 2025-04-03 21:39:24 +02:00 committed by Christian Brabandt
parent d211558044
commit 2a6be83512
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
16 changed files with 274 additions and 26 deletions

View File

@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
" Last Change: 2025 Mar 29
" Last Change: 2025 Apr 03
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@ -771,12 +771,31 @@ syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
" Set command and associated set-options (vimOptions) with comment {{{2
syn match vimSet "\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skipwhite nextgroup=vimSetBang,vimSetArgs
syn region vimSetArgs contained start="\S" skip=+\\|\|\n\s*\\\|\n\s*["#]\\ + matchgroup=vimCmdSep end="|" end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=@vimComment,@vimContinue,vimErrSetting,vimOption,vimSetAll,vimSetTermcap
syn region vimSetEqual contained matchgroup=vimOper start="[=:]\|[-+^]=" skip=+\\|\|\\\s\|\n\s*\\\|\n\s*["#]\\ \|^\s*\\\|^\s*["#]\\ + matchgroup=vimCmdSep end="|" end="\ze\s" end="$" contains=@vimContinue,vimCtrlChar,vimEnvvar,vimNotation,vimSetSep
syn region vimSetComment contained start=+"+ skip=+\n\s*\%(\\\||"\\ \)+ end="$" contains=@vimCommentGroup,vimCommentString extend
syn match vimSetCmdSep contained "|" skipwhite nextgroup=@vimCmdList,vimSubst1,vimFunc
syn match vimSetEscape contained "\\\%(\\[|"]\|.\)"
syn match vimSetBarEscape contained "\\|"
syn match vimSetQuoteEscape contained +\\"+
syn region vimSetArgs contained
\ start="\S"
\ skip=+\n\s*\%(\\\|["#]\\ \)\|^\s*"\\ +
\ end=+\ze\\\@1<![|"]+
"\ assume this isn't an escaped char with backslash on the previous line
\ end=+^\s*\\\ze[|"]+
\ end="\ze\s#"
\ end="$"
\ nextgroup=vimSetCmdSep,vimSetComment,vim9Comment
\ contains=@vimContinue,vimErrSetting,vimOption,vimSetAll,vimSetTermcap
\ keepend
syn region vimSetEqual contained
\ matchgroup=vimOper
\ start="[=:]\|[-+^]="
\ skip=+\\\s\|^\s*\%(\\\|["#]\\ \)+
\ end="\ze\s"
\ contains=@vimContinue,vimCtrlChar,vimEnvvar,vimNotation,vimSetSep,vimSetEscape,vimSetBarEscape,vimSetQuoteEscape
syn match vimSetBang contained "\a\@1<=!" skipwhite nextgroup=vimSetAll,vimSetTermcap
syn keyword vimSetAll contained all nextgroup=vimSetMod
syn keyword vimSetTermcap contained termcap
syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar
syn match vimSetSep contained "[,:]"
syn match vimSetMod contained "\a\@1<=\%(&vim\=\|[!&?<]\)"
@ -1624,9 +1643,9 @@ if !exists("skip_vim_syntax_inits")
hi def link vimSet vimCommand
hi def link vimSetAll vimOption
hi def link vimSetBang vimBang
hi def link vimSetComment vimComment
hi def link vimSetMod vimOption
hi def link vimSetSep vimSep
hi def link vimSetString vimString
hi def link vimSetTermcap vimOption
hi def link vimShebang PreProc
hi def link vimSleep vimCommand

View File

@ -17,4 +17,4 @@
|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h|++0#af5f00255&|=|9+0#0000000&|6| @61
|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h|^+0#af5f00255&|=|2+0#0000000&| @62
|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h|-+0#af5f00255&|=|9+0#0000000&|6| @61
@57|1|9|,|1| @9|1|3|%|
@57|1|9|,|1| @9|1|2|%|

View File

@ -17,4 +17,4 @@
|"+0#0000e05&| |:|h|e|l|p| |o|p|t|i|o|n|-|b|a|c|k|s|l|a|s|h| +0#0000000&@50
@75
|"+0#0000e05&| |W|h|e|n| |s|e|t@1|i|n|g| |o|p|t|i|o|n|s| |u|s|i|n|g| |||:|l|e|t||| |a|n|d| |||l|i|t|e|r|a|l|-|s|t|r|i|n|g|||,| |y|o|u| |n|e@1|d| |t|o| |u|s|@+0#4040ff13&@2
| +0#0000000&@56|3|7|,|0|-|1| @7|3|2|%|
| +0#0000000&@56|3|7|,|0|-|1| @7|2|9|%|

View File

@ -17,4 +17,4 @@
|"+0#0000e05&| |T|h|i|s| |e|x|a|m|p|l|e| |s|e|t|s| |t|h|e| |'|t|i|t|l|e|s|t|r|i|n|g|'| |o|p|t|i|o|n| |t|o| |"+0#e000002&|h|i|||t|h|e|r|e|"|:+0#0000e05&| +0#0000000&@15
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|h+0#0000000&|i|\|||t|h|e|r|e| @49
|"+0#0000e05&| |T|h|i|s| |s|e|t|s| |t|h|e| |'|t|i|t|l|e|s|t|r|i|n|g|'| |o|p|t|i|o|n| |t|o| |"+0#e000002&|h|i|"| +0#0000e05&|a|n|d| |'|i|c|o|n|s|t|r|i|n|g|'| |t|o| |"+0#e000002&|t|h|e|r|e|"|:+0#0000e05&| +0#0000000&@1
@57|5|4|,|1| @9|5|1|%|
@57|5|4|,|1| @9|4|6|%|

View File

@ -17,4 +17,4 @@
|s+0#af5f00255&|e|t| +0#0000000&|p+0#e000e06&|a|t|h|=+0#af5f00255&|a+0#0000000&|b|c|,+0#e000e06&|d+0#0000000&|e|f|,+0#e000e06&|g+0#0000000&|h|i| @54
@6|"+0#0000e05&|\| |d|e|f| |i|s| |t|h|e| |'|d|e|f|i|n|e|'| |o|p|t|i|o|n| +0#0000000&@39
@6|\+0#e000e06&| +0#0000000&|d+0#e000e06&|e|f|=+0#af5f00255&|a+0#0000000&|b|c|,+0#e000e06&|d+0#0000000&|e|f|,+0#e000e06&|g+0#0000000&|h|i| @51
@57|7|2|,|1| @9|7|0|%|
@57|7|2|,|1| @9|6|2|%|

View File

@ -9,7 +9,7 @@
@6|\+0#e000e06&|a+0#0000000&|b|c|,+0#e000e06&|d+0#0000000&|e|f| @60
@75
@75
|"+0#0000e05&| |C|o|m|p|i|l|e|r|S|e|t| +0#0000000&@61
|"+0#0000e05&| |:|C|o|m|p|i|l|e|r|S|e|t| +0#0000000&@60
@75
|C+0#af5f00255&|o|m|p|i|l|e|r|S|e|t| +0#0000000&|m+0#e000e06&|a|k|e|p|r|g|=+0#af5f00255&|a+0#0000000&|n|t| @51
|C+0#af5f00255&|o|m|p|i|l|e|r|S|e|t| +0#0000000&|e+0#e000e06&|r@1|o|r|f|o|r|m|a|t|=+0#af5f00255&|\+0#0000000&| |%|#|[|%|.|%|#|]|\| |%|#|%|f|:+0#e000e06&|%+0#0000000&|l|:+0#e000e06&|%+0#0000000&|v|:+0#e000e06&|%+0#0000000&|*|\@1|d|:+0#e000e06&|%+0#0000000&|*|\@1|d|:+0#e000e06&|\+0#0000000&| |%|t|%|[|%|^|:+0#e000e06&|]+0#0000000&|%|#|:+0#e000e06&|%+0#0000000&|m|,+0#e000e06&
@ -17,4 +17,4 @@
@75
@75
|"+0#0000e05&| |U|n|r|e|p|o|r|t|e|d| |i|s@1|u|e| |(|d|o|u|b|l|e| |b|a|c|k|s|l|a|s|h|)| +0#0000000&@37
@57|9|0|,|0|-|1| @7|8|9|%|
@57|9|0|,|0|-|1| @7|8|0|%|

View File

@ -9,12 +9,12 @@
|s+0#af5f00255&|e|t| +0#0000000&|q+0#e000e06&|u|o|t|e@1|s|c|a|p|e|=+0#af5f00255&|\+0#0000000&| @57
|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@64
@75
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
| +0#0000000&@56|1|0|8|,|1| @8|B|o|t|
@75
|"+0#0000e05&| |I|s@1|u|e| |#|1|6|9|1|3| |(|v|i|m| |s|y|n|t|a|x|:| |s|e|t| |l|a|n|g|m|a|p| |m|a|y| |h|a|v|e| |w|r|o|n|g| |h|i|g|h|l|i|g|h|t|)| +0#0000000&@9
@75
|s+0#af5f00255&|e|t| +0#0000000&|l+0#e000e06&|a|n|g|m|a|p|++0#af5f00255&|=|Ф+0#0000000&|Ы|В|А|П|Р|О|Л|Д|Ж|Э|Ё|;|A|S|D|F|G|H|J|K|L|\@1|:+0#e000e06&|\+0#0000000&@1|"|\@1||| @30
|s+0#af5f00255&|e|t| +0#0000000&|l+0#e000e06&|a|n|g|m|a|p|++0#af5f00255&|=|Я+0#0000000&|Ч|С|М|И|Т|Ь|Б|Ю|;|Z|X|C|V|B|N|M|<+0#e000e06&|>| +0#0000000&@42
@75
|s+0#af5f00255&|e|t| +0#0000000&|l+0#e000e06&|a|n|g|m|a|p|++0#af5f00255&|=|Ф+0#0000000&|Ы|В|А|П|Р|О|Л|Д|Ж|Э|Ё|;|A|S|D|F|G|H|J|K|L|\@1|:+0#e000e06&|\+0#0000000&@1|"|\@1||| @30
@6|\+0#e000e06&| +0#0000000&|l+0#e000e06&|a|n|g|m|a|p|++0#af5f00255&|=|Я+0#0000000&|Ч|С|М|И|Т|Ь|Б|Ю|;|Z|X|C|V|B|N|M|<+0#e000e06&|>| +0#0000000&@38
@57|1|0|8|,|1| @8|9|7|%|

View File

@ -0,0 +1,20 @@
| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|l+0#e000e06&|a|n|g|m|a|p|++0#af5f00255&|=|Я+0#0000000&|Ч|С|М|И|Т|Ь|Б|Ю|;|Z|X|C|V|B|N|M|<+0#e000e06&|>| +0#0000000&@38
@75
|s+0#af5f00255&|e|t| +0#0000000&|l+0#e000e06&|a|n|g|m|a|p|++0#af5f00255&|=|Ф+0#0000000&|Ы|В|А|П|Р|О|Л|Д|Ж|Э|Ё|;|A|S|D|F|G|H|J|K|L|\@1|:+0#e000e06&|\+0#0000000&@1|"|\@1||| |l+0#e000e06&|a|n|g|m|a|p|++0#af5f00255&|=|Я+0#0000000&|Ч|С|М|И|Т|Ь|Б|Ю|;|Z|X|C|V|B|N|M|<+0#e000e06&|>| +0#0000000&@1
> @74
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
| +0#0000000&@56|1|2|4|,|0|-|1| @6|B|o|t|

View File

@ -0,0 +1,20 @@
>"+0#0000e05#ffffff0| |V|i|m| |:|s|e|t| |c|o|m@1|a|n|d| |(|e|s|c|a|p|e|d| |c|h|a|r|a|c|t|e|r|s|)| +0#0000000&@35
|"+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|S|e|t|E|s|c|a|p|e| @5|D|i|f@1|A|d@1| +0#0000000&@24
|"+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|S|e|t|B|a|r|E|s|c|a|p|e| @2|D|i|f@1|D|e|l|e|t|e| +0#0000000&@21
|"+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|S|e|t|Q|u|o|t|e|E|s|c|a|p|e| |D|i|f@1|D|e|l|e|t|e| +0#0000000&@21
|"+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|S|e|t|E|q|u|a|l| @6|D|i|f@1|C|h|a|n|g|e| +0#0000000&@21
@75
@75
|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|-@1| |1| |-@1|"| +0#0000000&@60
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255|a|f+0&#ffd7ff255|o@1|\+0&#5fd7ff255|a|b+0&#ffd7ff255|a|r|\+0&#5fd7ff255|a| +0&#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@36
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255|a|f+0&#ffd7ff255|o@1|\+0&#5fd7ff255|a|b+0&#ffd7ff255|a|r|\+0&#5fd7ff255|a| +0&#ffffff0@46
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255| |f+0&#ffd7ff255|o@1|\+0&#5fd7ff255| |b+0&#ffd7ff255|a|r|\+0&#5fd7ff255| | +0&#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@36
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255| |f+0&#ffd7ff255|o@1|\+0&#5fd7ff255| |b+0&#ffd7ff255|a|r|\+0&#5fd7ff255| | +0&#ffffff0@46
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#4040ff13#afffff255|||f+0#0000000#ffd7ff255|o@1|\+0#4040ff13#afffff255|||b+0#0000000#ffd7ff255|a|r|\+0#4040ff13#afffff255||| +0#0000000#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@36
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#4040ff13#afffff255|||f+0#0000000#ffd7ff255|o@1|\+0#4040ff13#afffff255|||b+0#0000000#ffd7ff255|a|r|\+0#4040ff13#afffff255||| +0#0000000#ffffff0@46
@57|1|,|1| @10|T|o|p|

View File

@ -0,0 +1,20 @@
|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255| |f+0&#ffd7ff255|o@1|\+0&#5fd7ff255| |b+0&#ffd7ff255|a|r|\+0&#5fd7ff255| | +0&#ffffff0@46
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#4040ff13#afffff255|||f+0#0000000#ffd7ff255|o@1|\+0#4040ff13#afffff255|||b+0#0000000#ffd7ff255|a|r|\+0#4040ff13#afffff255||| +0#0000000#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@36
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
>s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#4040ff13#afffff255|||f+0#0000000#ffd7ff255|o@1|\+0#4040ff13#afffff255|||b+0#0000000#ffd7ff255|a|r|\+0#4040ff13#afffff255||| +0#0000000#ffffff0@46
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#4040ff13#afffff255|"|f+0#0000000#ffd7ff255|o@1|\+0#4040ff13#afffff255|"|b+0#0000000#ffd7ff255|a|r|\+0#4040ff13#afffff255|"| +0#0000000#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@36
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#4040ff13#afffff255|"|f+0#0000000#ffd7ff255|o@1|\+0#4040ff13#afffff255|"|b+0#0000000#ffd7ff255|a|r|\+0#4040ff13#afffff255|"| +0#0000000#ffffff0@46
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
@75
|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|-@1| |2| |-@1|"| +0#0000000&@60
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@1|a+0&#ffd7ff255|f|o@1|\+0&#5fd7ff255@1|a+0&#ffd7ff255|b|a|r|\+0&#5fd7ff255@1|a+0&#ffd7ff255| +0&#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@33
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@1|a+0&#ffd7ff255|f|o@1|\+0&#5fd7ff255@1|a+0&#ffd7ff255|b|a|r|\+0&#5fd7ff255@1|a+0&#ffd7ff255| +0&#ffffff0@43
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@1| +0&#ffffff0|f|o@1|\@1| |b|a|r|\@1| @1|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@33
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
@57|1|9|,|1| @9|2|1|%|

View File

@ -0,0 +1,20 @@
|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@1| +0&#ffffff0|f|o@1|\@1| |b|a|r|\@1| @44
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@1|||f+0&#ffd7ff255|o@1|\+0&#5fd7ff255@1|||b+0&#ffd7ff255|a|r|\+0&#5fd7ff255@1||| +0&#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@33
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
>s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@1|||f+0&#ffd7ff255|o@1|\+0&#5fd7ff255@1|||b+0&#ffd7ff255|a|r|\+0&#5fd7ff255@1||| +0&#ffffff0@43
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@1|"|f+0&#ffd7ff255|o@1|\+0&#5fd7ff255@1|"|b+0&#ffd7ff255|a|r|\+0&#5fd7ff255@1|"| +0&#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@33
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@1|"|f+0&#ffd7ff255|o@1|\+0&#5fd7ff255@1|"|b+0&#ffd7ff255|a|r|\+0&#5fd7ff255@1|"| +0&#ffffff0@43
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
@75
|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|-@1| |3| |-@1|"| +0#0000000&@60
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@2|a|f+0&#ffd7ff255|o@1|\+0&#5fd7ff255@2|a|b+0&#ffd7ff255|a|r|\+0&#5fd7ff255@2|a| +0&#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@30
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@2|a|f+0&#ffd7ff255|o@1|\+0&#5fd7ff255@2|a|b+0&#ffd7ff255|a|r|\+0&#5fd7ff255@2|a| +0&#ffffff0@40
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@2| |f+0&#ffd7ff255|o@1|\+0&#5fd7ff255@2| |b+0&#ffd7ff255|a|r|\+0&#5fd7ff255@2| | +0&#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@30
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
@57|3|7|,|1| @9|5|1|%|

View File

@ -0,0 +1,20 @@
|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@2| |f+0&#ffd7ff255|o@1|\+0&#5fd7ff255@2| |b+0&#ffd7ff255|a|r|\+0&#5fd7ff255@2| | +0&#ffffff0@40
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@1|\+0#4040ff13#afffff255|||f+0#0000000#ffd7ff255|o@1|\+0&#5fd7ff255@1|\+0#4040ff13#afffff255|||b+0#0000000#ffd7ff255|a|r|\+0&#5fd7ff255@1|\+0#4040ff13#afffff255||| +0#0000000#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@30
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
>s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@1|\+0#4040ff13#afffff255|||f+0#0000000#ffd7ff255|o@1|\+0&#5fd7ff255@1|\+0#4040ff13#afffff255|||b+0#0000000#ffd7ff255|a|r|\+0&#5fd7ff255@1|\+0#4040ff13#afffff255||| +0#0000000#ffffff0@40
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@1|\+0#4040ff13#afffff255|"|f+0#0000000#ffd7ff255|o@1|\+0&#5fd7ff255@1|\+0#4040ff13#afffff255|"|b+0#0000000#ffd7ff255|a|r|\+0&#5fd7ff255@1|\+0#4040ff13#afffff255|"| +0#0000000#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@30
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@1|\+0#4040ff13#afffff255|"|f+0#0000000#ffd7ff255|o@1|\+0&#5fd7ff255@1|\+0#4040ff13#afffff255|"|b+0#0000000#ffd7ff255|a|r|\+0&#5fd7ff255@1|\+0#4040ff13#afffff255|"| +0#0000000#ffffff0@40
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
@75
|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|-@1| |4| |-@1|"| +0#0000000&@60
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@3|a+0&#ffd7ff255|f|o@1|\+0&#5fd7ff255@3|a+0&#ffd7ff255|b|a|r|\+0&#5fd7ff255@3|a+0&#ffd7ff255| +0&#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@27
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@3|a+0&#ffd7ff255|f|o@1|\+0&#5fd7ff255@3|a+0&#ffd7ff255|b|a|r|\+0&#5fd7ff255@3|a+0&#ffd7ff255| +0&#ffffff0@37
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@3| +0&#ffffff0|f|o@1|\@3| |b|a|r|\@3| @1|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@27
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
@57|5@1|,|1| @9|8|1|%|

View File

@ -0,0 +1,20 @@
|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@3| +0&#ffffff0|f|o@1|\@3| |b|a|r|\@3| @38
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@3|||f+0&#ffd7ff255|o@1|\+0&#5fd7ff255@3|||b+0&#ffd7ff255|a|r|\+0&#5fd7ff255@3||| +0&#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@27
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
>s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@3|||f+0&#ffd7ff255|o@1|\+0&#5fd7ff255@3|||b+0&#ffd7ff255|a|r|\+0&#5fd7ff255@3||| +0&#ffffff0@37
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|\+0#0000000#5fd7ff255@3|"|f+0&#ffd7ff255|o@1|\+0&#5fd7ff255@3|"|b+0&#ffd7ff255|a|r|\+0&#5fd7ff255@3|"| +0&#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@27
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|f+0#0000000#ffd7ff255|o@1|\+0&#5fd7ff255@3|"|\@3|"|b+0&#ffd7ff255|a|r|\+0&#5fd7ff255@3|"| +0&#ffffff0@37
|e+0#af5f00255&|c|h|o| +0#0000000&|&+0#00e0e07&|t|i|t|l|e|s|t|r|i|n|g| +0#0000000&@57
@75
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
| +0#0000000&@56|7|3|,|1| @9|B|o|t|

View File

@ -93,7 +93,7 @@ set path=
\abc,def
" CompilerSet
" :CompilerSet
CompilerSet makeprg=ant
CompilerSet errorformat=\ %#[%.%#]\ %#%f:%l:%v:%*\\d:%*\\d:\ %t%[%^:]%#:%m,
@ -111,3 +111,14 @@ echo "Foo"
set quoteescape=\
echo "Foo"
" Issue #16913 (vim syntax: set langmap may have wrong highlight)
set langmap+=ФЫВАПРОЛДЖЭЁ;ASDFGHJKL\\:\\"\\|
set langmap+=ЯЧСМИТЬБЮ;ZXCVBNM<>
set langmap+=ФЫВАПРОЛДЖЭЁ;ASDFGHJKL\\:\\"\\|
\ langmap+=ЯЧСМИТЬБЮ;ZXCVBNM<>
set langmap+=ФЫВАПРОЛДЖЭЁ;ASDFGHJKL\\:\\"\\| langmap+=ЯЧСМИТЬБЮ;ZXCVBNM<>

View File

@ -0,0 +1,79 @@
" Vim :set command (escaped characters)
" VIM_TEST_SETUP hi link vimSetEscape DiffAdd
" VIM_TEST_SETUP hi link vimSetBarEscape DiffDelete
" VIM_TEST_SETUP hi link vimSetQuoteEscape DiffDelete
" VIM_TEST_SETUP hi link vimSetEqual DiffChange
echo "-- 1 --"
set titlestring=\afoo\abar\a " comment
echo &titlestring
set titlestring=\afoo\abar\a
echo &titlestring
set titlestring=\ foo\ bar\ " comment
echo &titlestring
set titlestring=\ foo\ bar\
echo &titlestring
set titlestring=\|foo\|bar\| " comment
echo &titlestring
set titlestring=\|foo\|bar\|
echo &titlestring
set titlestring=\"foo\"bar\" " comment
echo &titlestring
set titlestring=\"foo\"bar\"
echo &titlestring
echo "-- 2 --"
set titlestring=\\afoo\\abar\\a " comment
echo &titlestring
set titlestring=\\afoo\\abar\\a
echo &titlestring
set titlestring=\\ foo\\ bar\\ " comment
echo &titlestring
set titlestring=\\ foo\\ bar\\
echo &titlestring
set titlestring=\\|foo\\|bar\\| " comment
echo &titlestring
set titlestring=\\|foo\\|bar\\|
echo &titlestring
set titlestring=\\"foo\\"bar\\" " comment
echo &titlestring
set titlestring=\\"foo\\"bar\\"
echo &titlestring
echo "-- 3 --"
set titlestring=\\\afoo\\\abar\\\a " comment
echo &titlestring
set titlestring=\\\afoo\\\abar\\\a
echo &titlestring
set titlestring=\\\ foo\\\ bar\\\ " comment
echo &titlestring
set titlestring=\\\ foo\\\ bar\\\
echo &titlestring
set titlestring=\\\|foo\\\|bar\\\| " comment
echo &titlestring
set titlestring=\\\|foo\\\|bar\\\|
echo &titlestring
set titlestring=\\\"foo\\\"bar\\\" " comment
echo &titlestring
set titlestring=\\\"foo\\\"bar\\\"
echo &titlestring
echo "-- 4 --"
set titlestring=\\\\afoo\\\\abar\\\\a " comment
echo &titlestring
set titlestring=\\\\afoo\\\\abar\\\\a
echo &titlestring
set titlestring=\\\\ foo\\\\ bar\\\\ " comment
echo &titlestring
set titlestring=\\\\ foo\\\\ bar\\\\
echo &titlestring
set titlestring=\\\\|foo\\\\|bar\\\\| " comment
echo &titlestring
set titlestring=\\\\|foo\\\\|bar\\\\|
echo &titlestring
set titlestring=\\\\"foo\\\\"bar\\\\" " comment
echo &titlestring
set titlestring=foo\\\\"\\\\"bar\\\\"
echo &titlestring

View File

@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
" Last Change: 2025 Mar 29
" Last Change: 2025 Apr 03
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@ -823,12 +823,31 @@ syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
" Set command and associated set-options (vimOptions) with comment {{{2
syn match vimSet "\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skipwhite nextgroup=vimSetBang,vimSetArgs
syn region vimSetArgs contained start="\S" skip=+\\|\|\n\s*\\\|\n\s*["#]\\ + matchgroup=vimCmdSep end="|" end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=@vimComment,@vimContinue,vimErrSetting,vimOption,vimSetAll,vimSetTermcap
syn region vimSetEqual contained matchgroup=vimOper start="[=:]\|[-+^]=" skip=+\\|\|\\\s\|\n\s*\\\|\n\s*["#]\\ \|^\s*\\\|^\s*["#]\\ + matchgroup=vimCmdSep end="|" end="\ze\s" end="$" contains=@vimContinue,vimCtrlChar,vimEnvvar,vimNotation,vimSetSep
syn region vimSetComment contained start=+"+ skip=+\n\s*\%(\\\||"\\ \)+ end="$" contains=@vimCommentGroup,vimCommentString extend
syn match vimSetCmdSep contained "|" skipwhite nextgroup=@vimCmdList,vimSubst1,vimFunc
syn match vimSetEscape contained "\\\%(\\[|"]\|.\)"
syn match vimSetBarEscape contained "\\|"
syn match vimSetQuoteEscape contained +\\"+
syn region vimSetArgs contained
\ start="\S"
\ skip=+\n\s*\%(\\\|["#]\\ \)\|^\s*"\\ +
\ end=+\ze\\\@1<![|"]+
"\ assume this isn't an escaped char with backslash on the previous line
\ end=+^\s*\\\ze[|"]+
\ end="\ze\s#"
\ end="$"
\ nextgroup=vimSetCmdSep,vimSetComment,vim9Comment
\ contains=@vimContinue,vimErrSetting,vimOption,vimSetAll,vimSetTermcap
\ keepend
syn region vimSetEqual contained
\ matchgroup=vimOper
\ start="[=:]\|[-+^]="
\ skip=+\\\s\|^\s*\%(\\\|["#]\\ \)+
\ end="\ze\s"
\ contains=@vimContinue,vimCtrlChar,vimEnvvar,vimNotation,vimSetSep,vimSetEscape,vimSetBarEscape,vimSetQuoteEscape
syn match vimSetBang contained "\a\@1<=!" skipwhite nextgroup=vimSetAll,vimSetTermcap
syn keyword vimSetAll contained all nextgroup=vimSetMod
syn keyword vimSetTermcap contained termcap
syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar
syn match vimSetSep contained "[,:]"
syn match vimSetMod contained "\a\@1<=\%(&vim\=\|[!&?<]\)"
@ -1682,9 +1701,9 @@ if !exists("skip_vim_syntax_inits")
hi def link vimSet vimCommand
hi def link vimSetAll vimOption
hi def link vimSetBang vimBang
hi def link vimSetComment vimComment
hi def link vimSetMod vimOption
hi def link vimSetSep vimSep
hi def link vimSetString vimString
hi def link vimSetTermcap vimOption
hi def link vimShebang PreProc
hi def link vimSleep vimCommand