7
|
1 " Vim syntax file
|
|
2 " Language: Radiance Scene Description
|
|
3 " Maintainer: Georg Mischler <schorsch@schorsch.com>
|
|
4 " Last change: 26. April. 2001
|
|
5
|
|
6 " Radiance is a lighting simulation software package written
|
|
7 " by Gregory Ward-Larson ("the computer artist formerly known
|
|
8 " as Greg Ward"), then at LBNL.
|
|
9 "
|
|
10 " http://radsite.lbl.gov/radiance/HOME.html
|
|
11 "
|
|
12 " Of course, there is also information available about it
|
|
13 " from http://www.schorsch.com/
|
|
14
|
|
15
|
|
16 " We take a minimalist approach here, highlighting just the
|
|
17 " essential properties of each object, its type and ID, as well as
|
|
18 " comments, external command names and the null-modifier "void".
|
|
19
|
|
20
|
|
21 " For version 5.x: Clear all syntax items
|
|
22 " For version 6.x: Quit when a syntax file was already loaded
|
|
23 if version < 600
|
|
24 syntax clear
|
|
25 elseif exists("b:current_syntax")
|
|
26 finish
|
|
27 endif
|
|
28
|
|
29 " all printing characters except '#' and '!' are valid in names.
|
|
30 if version >= 600
|
|
31 setlocal iskeyword=\",$-~
|
|
32 else
|
|
33 set iskeyword=\",$-~
|
|
34 endif
|
|
35
|
|
36 " The null-modifier
|
|
37 syn keyword radianceKeyword void
|
|
38
|
|
39 " The different kinds of scene description object types
|
|
40 " Reference types
|
|
41 syn keyword radianceExtraType contained alias instance
|
|
42 " Surface types
|
|
43 syn keyword radianceSurfType contained ring polygon sphere bubble
|
|
44 syn keyword radianceSurfType contained cone cup cylinder tube source
|
|
45 " Emitting material types
|
|
46 syn keyword radianceLightType contained light glow illum spotlight
|
|
47 " Material types
|
|
48 syn keyword radianceMatType contained mirror mist prism1 prism2
|
|
49 syn keyword radianceMatType contained metal plastic trans
|
|
50 syn keyword radianceMatType contained metal2 plastic2 trans2
|
|
51 syn keyword radianceMatType contained metfunc plasfunc transfunc
|
|
52 syn keyword radianceMatType contained metdata plasdata transdata
|
|
53 syn keyword radianceMatType contained dielectric interface glass
|
|
54 syn keyword radianceMatType contained BRTDfunc antimatter
|
|
55 " Pattern modifier types
|
|
56 syn keyword radiancePatType contained colorfunc brightfunc
|
|
57 syn keyword radiancePatType contained colordata colorpict brightdata
|
|
58 syn keyword radiancePatType contained colortext brighttext
|
|
59 " Texture modifier types
|
|
60 syn keyword radianceTexType contained texfunc texdata
|
|
61 " Mixture types
|
|
62 syn keyword radianceMixType contained mixfunc mixdata mixpict mixtext
|
|
63
|
|
64
|
|
65 " Each type name is followed by an ID.
|
|
66 " This doesn't work correctly if the id is one of the type names of the
|
|
67 " same class (which is legal for radiance), in which case the id will get
|
|
68 " type color as well, and the int count (or alias reference) gets id color.
|
|
69
|
|
70 syn region radianceID start="\<alias\>" end="\<\k*\>" contains=radianceExtraType
|
|
71 syn region radianceID start="\<instance\>" end="\<\k*\>" contains=radianceExtraType
|
|
72
|
|
73 syn region radianceID start="\<source\>" end="\<\k*\>" contains=radianceSurfType
|
|
74 syn region radianceID start="\<ring\>" end="\<\k*\>" contains=radianceSurfType
|
|
75 syn region radianceID start="\<polygon\>" end="\<\k*\>" contains=radianceSurfType
|
|
76 syn region radianceID start="\<sphere\>" end="\<\k*\>" contains=radianceSurfType
|
|
77 syn region radianceID start="\<bubble\>" end="\<\k*\>" contains=radianceSurfType
|
|
78 syn region radianceID start="\<cone\>" end="\<\k*\>" contains=radianceSurfType
|
|
79 syn region radianceID start="\<cup\>" end="\<\k*\>" contains=radianceSurfType
|
|
80 syn region radianceID start="\<cylinder\>" end="\<\k*\>" contains=radianceSurfType
|
|
81 syn region radianceID start="\<tube\>" end="\<\k*\>" contains=radianceSurfType
|
|
82
|
|
83 syn region radianceID start="\<light\>" end="\<\k*\>" contains=radianceLightType
|
|
84 syn region radianceID start="\<glow\>" end="\<\k*\>" contains=radianceLightType
|
|
85 syn region radianceID start="\<illum\>" end="\<\k*\>" contains=radianceLightType
|
|
86 syn region radianceID start="\<spotlight\>" end="\<\k*\>" contains=radianceLightType
|
|
87
|
|
88 syn region radianceID start="\<mirror\>" end="\<\k*\>" contains=radianceMatType
|
|
89 syn region radianceID start="\<mist\>" end="\<\k*\>" contains=radianceMatType
|
|
90 syn region radianceID start="\<prism1\>" end="\<\k*\>" contains=radianceMatType
|
|
91 syn region radianceID start="\<prism2\>" end="\<\k*\>" contains=radianceMatType
|
|
92 syn region radianceID start="\<metal\>" end="\<\k*\>" contains=radianceMatType
|
|
93 syn region radianceID start="\<plastic\>" end="\<\k*\>" contains=radianceMatType
|
|
94 syn region radianceID start="\<trans\>" end="\<\k*\>" contains=radianceMatType
|
|
95 syn region radianceID start="\<metal2\>" end="\<\k*\>" contains=radianceMatType
|
|
96 syn region radianceID start="\<plastic2\>" end="\<\k*\>" contains=radianceMatType
|
|
97 syn region radianceID start="\<trans2\>" end="\<\k*\>" contains=radianceMatType
|
|
98 syn region radianceID start="\<metfunc\>" end="\<\k*\>" contains=radianceMatType
|
|
99 syn region radianceID start="\<plasfunc\>" end="\<\k*\>" contains=radianceMatType
|
|
100 syn region radianceID start="\<transfunc\>" end="\<\k*\>" contains=radianceMatType
|
|
101 syn region radianceID start="\<metdata\>" end="\<\k*\>" contains=radianceMatType
|
|
102 syn region radianceID start="\<plasdata\>" end="\<\k*\>" contains=radianceMatType
|
|
103 syn region radianceID start="\<transdata\>" end="\<\k*\>" contains=radianceMatType
|
|
104 syn region radianceID start="\<dielectric\>" end="\<\k*\>" contains=radianceMatType
|
|
105 syn region radianceID start="\<interface\>" end="\<\k*\>" contains=radianceMatType
|
|
106 syn region radianceID start="\<glass\>" end="\<\k*\>" contains=radianceMatType
|
|
107 syn region radianceID start="\<BRTDfunc\>" end="\<\k*\>" contains=radianceMatType
|
|
108 syn region radianceID start="\<antimatter\>" end="\<\k*\>" contains=radianceMatType
|
|
109
|
|
110 syn region radianceID start="\<colorfunc\>" end="\<\k*\>" contains=radiancePatType
|
|
111 syn region radianceID start="\<brightfunc\>" end="\<\k*\>" contains=radiancePatType
|
|
112 syn region radianceID start="\<colordata\>" end="\<\k*\>" contains=radiancePatType
|
|
113 syn region radianceID start="\<brightdata\>" end="\<\k*\>" contains=radiancePatType
|
|
114 syn region radianceID start="\<colorpict\>" end="\<\k*\>" contains=radiancePatType
|
|
115 syn region radianceID start="\<colortext\>" end="\<\k*\>" contains=radiancePatType
|
|
116 syn region radianceID start="\<brighttext\>" end="\<\k*\>" contains=radiancePatType
|
|
117
|
|
118 syn region radianceID start="\<texfunc\>" end="\<\k*\>" contains=radianceTexType
|
|
119 syn region radianceID start="\<texdata\>" end="\<\k*\>" contains=radianceTexType
|
|
120
|
|
121 syn region radianceID start="\<mixfunc\>" end="\<\k*\>" contains=radianceMixType
|
|
122 syn region radianceID start="\<mixdata\>" end="\<\k*\>" contains=radianceMixType
|
|
123 syn region radianceID start="\<mixtext\>" end="\<\k*\>" contains=radianceMixType
|
|
124
|
|
125 " external commands (generators, xform et al.)
|
|
126 syn match radianceCommand "^\s*!\s*[^\s]\+\>"
|
|
127
|
|
128 " The usual suspects
|
|
129 syn keyword radianceTodo contained TODO XXX
|
|
130 syn match radianceComment "#.*$" contains=radianceTodo
|
|
131
|
|
132 " Define the default highlighting.
|
|
133 " For version 5.7 and earlier: only when not done already
|
|
134 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
135 if version >= 508 || !exists("did_radiance_syn_inits")
|
|
136 if version < 508
|
|
137 let did_radiance_syn_inits = 1
|
|
138 command -nargs=+ HiLink hi link <args>
|
|
139 else
|
|
140 command -nargs=+ HiLink hi def link <args>
|
|
141 endif
|
|
142 HiLink radianceKeyword Keyword
|
|
143 HiLink radianceExtraType Type
|
|
144 HiLink radianceSurfType Type
|
|
145 HiLink radianceLightType Type
|
|
146 HiLink radianceMatType Type
|
|
147 HiLink radiancePatType Type
|
|
148 HiLink radianceTexType Type
|
|
149 HiLink radianceMixType Type
|
|
150 HiLink radianceComment Comment
|
|
151 HiLink radianceCommand Function
|
|
152 HiLink radianceID String
|
|
153 HiLink radianceTodo Todo
|
|
154 delcommand HiLink
|
|
155 endif
|
|
156
|
|
157 let b:current_syntax = "radiance"
|
|
158
|
|
159 " vim: ts=8 sw=2
|