2 " Language: WEB Changes
3 " Maintainer: Andreas Scherer <andreas.scherer@pobox.com>
4 " Last Change: April 25, 2001
6 " Details of the change mechanism of the WEB and CWEB languages can be found
7 " in the articles by Donald E. Knuth and Silvio Levy cited in "web.vim" and
8 " "cweb.vim" respectively.
10 " For version 5.x: Clear all syntax items
11 " For version 6.x: Quit when a syntax file was already loaded
14 elseif exists("b:current_syntax")
18 " We distinguish two groups of material, (a) stuff between @x..@y, and
19 " (b) stuff between @y..@z. WEB/CWEB ignore everything else in a change file.
20 syn region changeFromMaterial start="^@x.*$"ms=e+1 end="^@y.*$"me=s-1
21 syn region changeToMaterial start="^@y.*$"ms=e+1 end="^@z.*$"me=s-1
23 " Define the default highlighting.
24 " For version 5.7 and earlier: only when not done already
25 " For version 5.8 and later: only when an item doesn't have highlighting yet
26 if version >= 508 || !exists("did_change_syntax_inits")
28 let did_change_syntax_inits = 1
29 command -nargs=+ HiLink hi link <args>
31 command -nargs=+ HiLink hi def link <args>
34 HiLink changeFromMaterial String
35 HiLink changeToMaterial Statement
40 let b:current_syntax = "change"