annotate runtime/syntax/radiance.vim @ 22248:80a000b09cb0 v8.2.1673

patch 8.2.1673: complete_info() selected index has an invalid value Commit: https://github.com/vim/vim/commit/b806aa5bd910dba94fbde586f6019b4825813d28 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 12 22:52:57 2020 +0200 patch 8.2.1673: complete_info() selected index has an invalid value Problem: complete_info() selected index has an invalid value. (Ben Jackson) Solution: Set the index when there is only one match. (closes https://github.com/vim/vim/issues/6945) Add test for complete_info().
author Bram Moolenaar <Bram@vim.org>
date Sat, 12 Sep 2020 23:00:03 +0200
parents 46763b01cd9a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Radiance Scene Description
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Georg Mischler <schorsch@schorsch.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last change: 26. April. 2001
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Radiance is a lighting simulation software package written
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " by Gregory Ward-Larson ("the computer artist formerly known
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " as Greg Ward"), then at LBNL.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " http://radsite.lbl.gov/radiance/HOME.html
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " Of course, there is also information available about it
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " from http://www.schorsch.com/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " We take a minimalist approach here, highlighting just the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " essential properties of each object, its type and ID, as well as
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " comments, external command names and the null-modifier "void".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
21 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
22 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " all printing characters except '#' and '!' are valid in names.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
27 setlocal iskeyword=\",$-~
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " The null-modifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword radianceKeyword void
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " The different kinds of scene description object types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " Reference types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword radianceExtraType contained alias instance
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " Surface types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword radianceSurfType contained ring polygon sphere bubble
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword radianceSurfType contained cone cup cylinder tube source
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " Emitting material types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword radianceLightType contained light glow illum spotlight
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " Material types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword radianceMatType contained mirror mist prism1 prism2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword radianceMatType contained metal plastic trans
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword radianceMatType contained metal2 plastic2 trans2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword radianceMatType contained metfunc plasfunc transfunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword radianceMatType contained metdata plasdata transdata
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword radianceMatType contained dielectric interface glass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword radianceMatType contained BRTDfunc antimatter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " Pattern modifier types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword radiancePatType contained colorfunc brightfunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword radiancePatType contained colordata colorpict brightdata
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword radiancePatType contained colortext brighttext
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 " Texture modifier types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword radianceTexType contained texfunc texdata
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " Mixture types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword radianceMixType contained mixfunc mixdata mixpict mixtext
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 " Each type name is followed by an ID.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 " This doesn't work correctly if the id is one of the type names of the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " same class (which is legal for radiance), in which case the id will get
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 " type color as well, and the int count (or alias reference) gets id color.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn region radianceID start="\<alias\>" end="\<\k*\>" contains=radianceExtraType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn region radianceID start="\<instance\>" end="\<\k*\>" contains=radianceExtraType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn region radianceID start="\<source\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn region radianceID start="\<ring\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn region radianceID start="\<polygon\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn region radianceID start="\<sphere\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn region radianceID start="\<bubble\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn region radianceID start="\<cone\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn region radianceID start="\<cup\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn region radianceID start="\<cylinder\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn region radianceID start="\<tube\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn region radianceID start="\<light\>" end="\<\k*\>" contains=radianceLightType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn region radianceID start="\<glow\>" end="\<\k*\>" contains=radianceLightType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn region radianceID start="\<illum\>" end="\<\k*\>" contains=radianceLightType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn region radianceID start="\<spotlight\>" end="\<\k*\>" contains=radianceLightType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn region radianceID start="\<mirror\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn region radianceID start="\<mist\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn region radianceID start="\<prism1\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn region radianceID start="\<prism2\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn region radianceID start="\<metal\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn region radianceID start="\<plastic\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn region radianceID start="\<trans\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn region radianceID start="\<metal2\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn region radianceID start="\<plastic2\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn region radianceID start="\<trans2\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn region radianceID start="\<metfunc\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn region radianceID start="\<plasfunc\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn region radianceID start="\<transfunc\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn region radianceID start="\<metdata\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn region radianceID start="\<plasdata\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn region radianceID start="\<transdata\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn region radianceID start="\<dielectric\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn region radianceID start="\<interface\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn region radianceID start="\<glass\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn region radianceID start="\<BRTDfunc\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn region radianceID start="\<antimatter\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn region radianceID start="\<colorfunc\>" end="\<\k*\>" contains=radiancePatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn region radianceID start="\<brightfunc\>" end="\<\k*\>" contains=radiancePatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn region radianceID start="\<colordata\>" end="\<\k*\>" contains=radiancePatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn region radianceID start="\<brightdata\>" end="\<\k*\>" contains=radiancePatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn region radianceID start="\<colorpict\>" end="\<\k*\>" contains=radiancePatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn region radianceID start="\<colortext\>" end="\<\k*\>" contains=radiancePatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn region radianceID start="\<brighttext\>" end="\<\k*\>" contains=radiancePatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn region radianceID start="\<texfunc\>" end="\<\k*\>" contains=radianceTexType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn region radianceID start="\<texdata\>" end="\<\k*\>" contains=radianceTexType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 syn region radianceID start="\<mixfunc\>" end="\<\k*\>" contains=radianceMixType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 syn region radianceID start="\<mixdata\>" end="\<\k*\>" contains=radianceMixType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 syn region radianceID start="\<mixtext\>" end="\<\k*\>" contains=radianceMixType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 " external commands (generators, xform et al.)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn match radianceCommand "^\s*!\s*[^\s]\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 " The usual suspects
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn keyword radianceTodo contained TODO XXX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 syn match radianceComment "#.*$" contains=radianceTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
126 " Only when an item doesn't have highlighting yet
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
127 hi def link radianceKeyword Keyword
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
128 hi def link radianceExtraType Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
129 hi def link radianceSurfType Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
130 hi def link radianceLightType Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
131 hi def link radianceMatType Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
132 hi def link radiancePatType Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
133 hi def link radianceTexType Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
134 hi def link radianceMixType Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
135 hi def link radianceComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
136 hi def link radianceCommand Function
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
137 hi def link radianceID String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
138 hi def link radianceTodo Todo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 let b:current_syntax = "radiance"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 " vim: ts=8 sw=2