1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377
|
" Vim :syntax command
" VIM_TEST_SETUP hi link vimGroupList Todo
" :syn-case
syntax case
syntax case match
syntax case ignore
" :syn clear
syntax clear @testCluster
syntax clear testGroup
syntax clear @testCluster testGroup
syntax clear testGroup @testCluster
" :syn-conceal
syntax conceal
syntax conceal on
syntax conceal off
" :syn-foldlevel
syntax foldlevel
syntax foldlevel start
syntax foldlevel minimum
" :syn-include
syntax include @Foo <sfile>:p:h/foo.vim
syntax include <sfile>:p:h/foo.vim
" :syn-iskeyword
syntax iskeyword
syntax iskeyword clear
syntax iskeyword @,48-57,192-255,$,_
" :syn-list
syntax list
syntax list Foo
syntax list @Bar
" :syn-spell
syntax spell
syntax spell toplevel
syntax spell notoplevel
syntax spell default
" :syn-sync-ccomment
syntax sync ccomment
syntax sync ccomment Foo
syntax sync ccomment minlines=42 maxlines=42 linebreaks=1 linecont "pattern"
syntax sync ccomment Foo minlines=42 maxlines=42 linebreaks=1 linecont "pattern"
" :syn-sync-fromstart
syntax sync fromstart
syntax sync fromstart minlines=42 maxlines=42 linebreaks=1 linecont "pattern"
" :syn-sync-linebreaks
syntax sync linebreaks=1
syntax sync linebreaks=1 minlines=42 maxlines=42 linecont "pattern"
" :syn-sync-linecont
syntax sync linecont "pattern"
syntax sync linecont "pattern" minlines=42 maxlines=42 linebreaks=1
" :syn-sync-(min|max)lines
syntax sync minlines=42 maxlines=42
syntax sync minlines=42 maxlines=42 linebreaks=1 linecont "pattern"
" obsolete
syntax sync lines=42
" :syn-sync sync patterns
syntax sync match testSyncMatch grouphere testFoo "pattern"
syntax sync match testSyncMatch groupthere testBar "pattern"
syntax sync match testSyncMatch grouphere NONE "pattern"
syntax sync match testSyncMatch groupthere NONE "pattern"
" :syn-sync skip groups
syn sync match testMatch "pattern"
syn sync region testRegion start="start-pattern" skip="skip-pattern" end="end-pattern"
" :syn-sync-clear
syntax sync clear
syntax sync clear Foo
" tail comments are not explicitly supported by :syntax, see :help :comment
syn match testMatch "pattern" contained " tail comment
" NOTE: comments not currently supported
syn keyword testKeyword keyword contained " tail comment
syn region testRegion start="start-pattern" skip="skip-pattern" end="end-pattern" contained " tail comment
" Multiline commands
syn keyword testKeyword
"\ OPTIONS
"\ conceal option
\ conceal
"\ cchar option
\ cchar=&
"\ contained option
\ contained
"\ containedin option
\ containedin=testContainer
"\ nextgroup option
\ nextgroup=testNext0,@testCluster
"\ transparent option
\ transparent
"\ skipwhite option
\ skipwhite
"\ skipempty option
\ skipempty
"\ skipnl option
\ skipnl
"\ KEYWORDS LIST
"\ keyword 1
\ keyword1
"\ keyword 2
\ keyword2
"\ keyword 3
\ keyword3
syn match testMatch
"\ MATCH PATTERN
"\ pattern start
\ /
"\ part 1 description
\pat1a .* pat1b
"\ part 2 description
\pat2a .* pat2b
"\ part 3 description
\pat3a .* pat3b
"\ pattern end
\/
"\ OPTIONS
"\ conceal option
\ conceal
"\ cchar option
\ cchar=&
"\ contained option
\ contained
"\ containedin option
\ containedin=testContainer
"\ nextgroup option
\ nextgroup=testNext0,@testCluster
"\ transparent option
\ transparent
"\ skipwhite option
\ skipwhite
"\ skipempty option
\ skipempty
"\ skipnl option
\ skipnl
"\ contains option
\ contains=testContained1,testContained2
"\ fold option
\ fold
"\ display option
\ display
"\ extend option
\ extend
"\ excludenl option
\ excludenl
"\ keepend option
\ keepend
syn region testRegion
"\ OPTIONS
"\ start option
\ start="start-pattern"
"\ skip option
\ skip="skip-pattern"
"\ end option
\ end="end-pattern"
"\ conceal option
\ conceal
"\ cchar option
\ cchar=&
"\ contained option
\ contained
"\ containedin option
\ containedin=testContainer
"\ nextgroup option
\ nextgroup=testNext0,@testCluster
"\ transparent option
\ transparent
"\ skipwhite option
\ skipwhite
"\ skipempty option
\ skipempty
"\ skipnl option
\ skipnl
"\ contains option
\ contains=testContained1,testContained2
"\ oneline option
\ oneline
"\ fold option
\ fold
"\ display option
\ display
"\ extend option
\ extend
"\ concealends option
\ concealends
"\ excludenl option
\ excludenl
"\ keepend option
\ keepend
syn cluster testCluster
"\ OPTIONS
"\ contains option
\ contains=testContained1,testContained2,testContained3
syn cluster testCluster
"\ OPTIONS
"\ add option
\ add=testAdd
"\ remove option
\ remove=testRemove
" multiline group list
syn keyword testNext0 keyword
syn keyword testNext1 keyword
syn keyword testNext2 keyword
syn keyword testNext3 keyword
syn keyword testNext4 keyword
syn keyword testNext5 keyword
syn keyword testNext6 keyword
syn keyword testNext7 keyword
syn keyword testNext8 keyword
syn keyword testNext9 keyword
syn keyword testKeyword
"\ nextgroup option
\ nextgroup=
"\ a comment
\ testNext0 , testNext1 ,
"\ a comment
\ testNext[2-8].* ,
"\ a comment
\ testNext9 , @testCluster skipwhite
"\ KEYWORDS LIST
\ keyword4
\ keyword5
\ keyword6
syn keyword testKeyword
"\ nextgroup option
\ nextgroup= testNext0,
"\ comment
\ , testNext1
"\ comment
\, testNext2
"\ comment
\ ,textNext3
"\ comment
\,textNext4
"\ comment
\ , textNext5 ,
"\ comment
\ textNext6,
"\ comment
\ textNext7 ,
"\ comment
\textNext8,
"\ comment
\textNext9 ,
"\ comment
\ textNext10
"\ comment
\ ,textNext11,
"\ comment
\ textNext12,textNext13,
"\ comment
\ textNext13,textNext14
"\ comment
\ ,textNext15,textNext16
"\ comment
\ , textNext17 , textNext18 ,
"\ comment
\ textNext19, @testCluster
\ skipnl
"\ KEYWORDS LIST
"\ keyword 1
\ keyword1
"\ keyword 2
\ keyword2
"\ keyword 3
\ keyword3
" leaking contained groups
" Example: runtime/syntax/zsh.vim
" "cluster" should not be highlighted outside of :syntax commands
function! s:ContainedGroup()
" ...
for cluster in ['markdownHighlight_zsh', 'zsh']
" ...
endfor
" ...
endfunction
" early termination of vimSynRegion
syn region testRegion
"\ | does not end the args region
"\ start="foo\|bar"
\ start="start"
\ end="end"
" Issue #18491 (Two ")"s are incorrectly colored 'vimOperError' in syntax/mail.vim)
syn match mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@NoSpell "\v(^(\> ?)*)@<=(from|reply-to):.*$" fold
" Issue #19366 (highlight error for contains elements in a new line)
" syntax/typst.vim
" Code {{{1
syntax cluster typstCode
\ contains=@typstCommon
\ ,@typstCodeKeywords
\ ,@typstCodeConstants
\ ,@typstCodeIdentifiers
\ ,@typstCodeFunctions
\ ,@typstCodeParens
" Code > Keywords {{{2
syntax cluster typstCodeKeywords
\ contains=typstCodeConditional
\ ,typstCodeRepeat
\ ,typstCodeKeyword
\ ,typstCodeStatement
syntax cluster typstCodeKeywords
\ contains=
"\ comment
\ typstCodeConditional
\ ,typstCodeRepeat
\ ,typstCodeKeyword
\ ,typstCodeStatement
syntax cluster typstCodeKeywords
\ contains=
"\ comment
\ typstCodeConditional
\ ,typstCodeRepeat
\ ,typstCodeKeyword
\ ,typstCodeStatement
" Examples from distributed syntax files
syn match slrnrcColorInit contained "^\s*color\s\+\S\+" skipwhite nextgroup=slrnrcColorVal\(Str\)\= contains=slrnrcColor\(Obj\|ObjStr\)\=
syn region slrnrcCmdLine matchgroup=slrnrcCmd start="\<\(autobaud\|...\|visible_headers\)\>" end="$" oneline contains=slrnrc\(String\|Comment\)
|