2 " Language: Texinfo (macro package for TeX)
3 " Maintainer: Sandor Kopanyi <sandor.kopanyi@mailbox.hu>
5 " Last Change: 2001 Apr 30
7 " the file follows the Texinfo manual structure; this file is based
8 " on manual for Texinfo version 4.0, 28 September 1999
9 " since @ can have special meanings, everything is 'match'-ed and 'region'-ed
10 " (including @ in 'iskeyword' option has unexpected effects)
12 " Remove any old syntax stuff hanging around, if needed
15 elseif exists("b:current_syntax")
19 if !exists("main_syntax")
20 let main_syntax = 'texinfo'
23 "in Texinfo can be real big things, like tables; sync for that
27 "syn match texinfoError "\S" contained TODO
28 syn match texinfoIdent "\k\+" contained "IDENTifier
29 syn match texinfoAssignment "\k\+\s*=\s*\k\+\s*$" contained "assigment statement ( var = val )
30 syn match texinfoSinglePar "\k\+\s*$" contained "single parameter (used for several @-commands)
31 syn match texinfoIndexPar "\k\k\s*$" contained "param. used for different *index commands (+ @documentlanguage command)
34 "marking words and phrases (chap. 9 in Texinfo manual)
35 "(almost) everything appears as 'contained' too; is for tables (@table)
37 "this chapter is at the beginning of this file to avoid overwritings
39 syn match texinfoSpecialChar "@acronym" contained
40 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@acronym{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
41 syn match texinfoSpecialChar "@b" contained
42 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@b{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
43 syn match texinfoSpecialChar "@cite" contained
44 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@cite{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
45 syn match texinfoSpecialChar "@code" contained
46 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@code{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
47 syn match texinfoSpecialChar "@command" contained
48 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@command{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
49 syn match texinfoSpecialChar "@dfn" contained
50 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@dfn{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
51 syn match texinfoSpecialChar "@email" contained
52 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@email{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
53 syn match texinfoSpecialChar "@emph" contained
54 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@emph{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
55 syn match texinfoSpecialChar "@env" contained
56 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@env{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
57 syn match texinfoSpecialChar "@file" contained
58 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@file{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
59 syn match texinfoSpecialChar "@i" contained
60 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@i{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
61 syn match texinfoSpecialChar "@kbd" contained
62 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@kbd{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
63 syn match texinfoSpecialChar "@key" contained
64 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@key{" end="}" contains=texinfoSpecialChar
65 syn match texinfoSpecialChar "@option" contained
66 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@option{" end="}" contains=texinfoSpecialChar
67 syn match texinfoSpecialChar "@r" contained
68 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@r{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
69 syn match texinfoSpecialChar "@samp" contained
70 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@samp{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
71 syn match texinfoSpecialChar "@sc" contained
72 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@sc{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
73 syn match texinfoSpecialChar "@strong" contained
74 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@strong{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
75 syn match texinfoSpecialChar "@t" contained
76 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@t{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
77 syn match texinfoSpecialChar "@url" contained
78 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@url{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
79 syn match texinfoSpecialChar "@var" contained
80 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@var{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
81 syn match texinfoAtCmd "^@kbdinputstyle" nextgroup=texinfoSinglePar skipwhite
84 "overview of Texinfo (chap. 1 in Texinfo manual)
85 syn match texinfoComment "@c .*"
86 syn match texinfoComment "@c$"
87 syn match texinfoComment "@comment .*"
88 syn region texinfoMltlnAtCmd matchgroup=texinfoComment start="^@ignore\s*$" end="^@end ignore\s*$" contains=ALL
91 "beginning a Texinfo file (chap. 3 in Texinfo manual)
92 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="@center " skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd oneline
93 syn region texinfoMltlnDMAtCmd matchgroup=texinfoAtCmd start="^@detailmenu\s*$" end="^@end detailmenu\s*$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
94 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@setfilename " skip="\\$" end="$" contains=texinfoSpecialChar oneline
95 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@settitle " skip="\\$" end="$" contains=texinfoSpecialChar oneline
96 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@shorttitlepage " skip="\\$" end="$" contains=texinfoSpecialChar oneline
97 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@title " skip="\\$" end="$" contains=texinfoSpecialChar oneline
98 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@titlefont{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
99 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@titlepage\s*$" end="^@end titlepage\s*$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoMltlnDMAtCmd,texinfoAtCmd,texinfoPrmAtCmd,texinfoMltlnAtCmd
100 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@vskip " skip="\\$" end="$" contains=texinfoSpecialChar oneline
101 syn match texinfoAtCmd "^@exampleindent" nextgroup=texinfoSinglePar skipwhite
102 syn match texinfoAtCmd "^@headings" nextgroup=texinfoSinglePar skipwhite
103 syn match texinfoAtCmd "^\\input" nextgroup=texinfoSinglePar skipwhite
104 syn match texinfoAtCmd "^@paragraphindent" nextgroup=texinfoSinglePar skipwhite
105 syn match texinfoAtCmd "^@setchapternewpage" nextgroup=texinfoSinglePar skipwhite
108 "ending a Texinfo file (chap. 4 in Texinfo manual)
109 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="@author " skip="\\$" end="$" contains=texinfoSpecialChar oneline
110 "all below @bye should be comment TODO
111 syn match texinfoAtCmd "^@bye\s*$"
112 syn match texinfoAtCmd "^@contents\s*$"
113 syn match texinfoAtCmd "^@printindex" nextgroup=texinfoIndexPar skipwhite
114 syn match texinfoAtCmd "^@setcontentsaftertitlepage\s*$"
115 syn match texinfoAtCmd "^@setshortcontentsaftertitlepage\s*$"
116 syn match texinfoAtCmd "^@shortcontents\s*$"
117 syn match texinfoAtCmd "^@summarycontents\s*$"
120 "chapter structuring (chap. 5 in Texinfo manual)
121 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendix" skip="\\$" end="$" contains=texinfoSpecialChar oneline
122 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline
123 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsection" skip="\\$" end="$" contains=texinfoSpecialChar oneline
124 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsubsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline
125 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsubsubsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline
126 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@centerchap" skip="\\$" end="$" contains=texinfoSpecialChar oneline
127 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@chapheading" skip="\\$" end="$" contains=texinfoSpecialChar oneline
128 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@chapter" skip="\\$" end="$" contains=texinfoSpecialChar oneline
129 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@heading" skip="\\$" end="$" contains=texinfoSpecialChar oneline
130 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@majorheading" skip="\\$" end="$" contains=texinfoSpecialChar oneline
131 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@section" skip="\\$" end="$" contains=texinfoSpecialChar oneline
132 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subheading " skip="\\$" end="$" contains=texinfoSpecialChar oneline
133 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subsection" skip="\\$" end="$" contains=texinfoSpecialChar oneline
134 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subsubheading" skip="\\$" end="$" contains=texinfoSpecialChar oneline
135 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subsubsection" skip="\\$" end="$" contains=texinfoSpecialChar oneline
136 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subtitle" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd oneline
137 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumbered" skip="\\$" end="$" contains=texinfoSpecialChar oneline
138 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumberedsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline
139 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumberedsubsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline
140 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumberedsubsubsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline
141 syn match texinfoAtCmd "^@lowersections\s*$"
142 syn match texinfoAtCmd "^@raisesections\s*$"
145 "nodes (chap. 6 in Texinfo manual)
146 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@anchor{" end="}"
147 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@top" skip="\\$" end="$" contains=texinfoSpecialChar oneline
148 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@node" skip="\\$" end="$" contains=texinfoSpecialChar oneline
151 "menus (chap. 7 in Texinfo manual)
152 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@menu\s*$" end="^@end menu\s*$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoMltlnDMAtCmd
155 "cross references (chap. 8 in Texinfo manual)
156 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@inforef{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
157 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@pxref{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
158 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@ref{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
159 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@uref{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
160 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@xref{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
163 "marking words and phrases (chap. 9 in Texinfo manual)
164 "(almost) everything appears as 'contained' too; is for tables (@table)
166 "this chapter is at the beginning of this file to avoid overwritings
169 "quotations and examples (chap. 10 in Texinfo manual)
170 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@cartouche\s*$" end="^@end cartouche\s*$" contains=ALL
171 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@display\s*$" end="^@end display\s*$" contains=ALL
172 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@example\s*$" end="^@end example\s*$" contains=ALL
173 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@flushleft\s*$" end="^@end flushleft\s*$" contains=ALL
174 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@flushright\s*$" end="^@end flushright\s*$" contains=ALL
175 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@format\s*$" end="^@end format\s*$" contains=ALL
176 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@lisp\s*$" end="^@end lisp\s*$" contains=ALL
177 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@quotation\s*$" end="^@end quotation\s*$" contains=ALL
178 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smalldisplay\s*$" end="^@end smalldisplay\s*$" contains=ALL
179 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smallexample\s*$" end="^@end smallexample\s*$" contains=ALL
180 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smallformat\s*$" end="^@end smallformat\s*$" contains=ALL
181 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smalllisp\s*$" end="^@end smalllisp\s*$" contains=ALL
182 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@exdent" skip="\\$" end="$" contains=texinfoSpecialChar oneline
183 syn match texinfoAtCmd "^@noindent\s*$"
184 syn match texinfoAtCmd "^@smallbook\s*$"
187 "lists and tables (chap. 11 in Texinfo manual)
188 syn match texinfoAtCmd "@asis" contained
189 syn match texinfoAtCmd "@columnfractions" contained
190 syn match texinfoAtCmd "@item" contained
191 syn match texinfoAtCmd "@itemx" contained
192 syn match texinfoAtCmd "@tab" contained
193 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@enumerate" end="^@end enumerate\s*$" contains=ALL
194 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ftable" end="^@end ftable\s*$" contains=ALL
195 syn region texinfoMltlnNAtCmd matchgroup=texinfoAtCmd start="^@itemize" end="^@end itemize\s*$" contains=ALL
196 syn region texinfoMltlnNAtCmd matchgroup=texinfoAtCmd start="^@multitable" end="^@end multitable\s*$" contains=ALL
197 syn region texinfoMltlnNAtCmd matchgroup=texinfoAtCmd start="^@table" end="^@end table\s*$" contains=ALL
198 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@vtable" end="^@end vtable\s*$" contains=ALL
201 "indices (chap. 12 in Texinfo manual)
202 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@\(c\|f\|k\|p\|t\|v\)index" skip="\\$" end="$" contains=texinfoSpecialChar oneline
203 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@..index" skip="\\$" end="$" contains=texinfoSpecialChar oneline
204 "@defcodeindex and @defindex is defined after chap. 15's @def* commands (otherwise those ones will overwrite these ones)
205 syn match texinfoSIPar "\k\k\s*\k\k\s*$" contained
206 syn match texinfoAtCmd "^@syncodeindex" nextgroup=texinfoSIPar skipwhite
207 syn match texinfoAtCmd "^@synindex" nextgroup=texinfoSIPar skipwhite
209 "special insertions (chap. 13 in Texinfo manual)
210 syn match texinfoSpecialChar "@\(!\|?\|@\|\s\)"
211 syn match texinfoSpecialChar "@{"
212 syn match texinfoSpecialChar "@}"
214 syn match texinfoSpecialChar "@=."
215 syn match texinfoSpecialChar "@\('\|\"\|\^\|`\)[aeiouyAEIOUY]"
216 syn match texinfoSpecialChar "@\~[aeinouyAEINOUY]"
217 syn match texinfoSpecialChar "@dotaccent{.}"
218 syn match texinfoSpecialChar "@H{.}"
219 syn match texinfoSpecialChar "@,{[cC]}"
220 syn match texinfoSpecialChar "@AA{}"
221 syn match texinfoSpecialChar "@aa{}"
222 syn match texinfoSpecialChar "@L{}"
223 syn match texinfoSpecialChar "@l{}"
224 syn match texinfoSpecialChar "@O{}"
225 syn match texinfoSpecialChar "@o{}"
226 syn match texinfoSpecialChar "@ringaccent{.}"
227 syn match texinfoSpecialChar "@tieaccent{..}"
228 syn match texinfoSpecialChar "@u{.}"
229 syn match texinfoSpecialChar "@ubaraccent{.}"
230 syn match texinfoSpecialChar "@udotaccent{.}"
231 syn match texinfoSpecialChar "@v{.}"
233 syn match texinfoSpecialChar "@AE{}"
234 syn match texinfoSpecialChar "@ae{}"
235 syn match texinfoSpecialChar "@copyright{}"
236 syn match texinfoSpecialChar "@bullet" contained "for tables and lists
237 syn match texinfoSpecialChar "@bullet{}"
238 syn match texinfoSpecialChar "@dotless{i}"
239 syn match texinfoSpecialChar "@dotless{j}"
240 syn match texinfoSpecialChar "@dots{}"
241 syn match texinfoSpecialChar "@enddots{}"
242 syn match texinfoSpecialChar "@equiv" contained "for tables and lists
243 syn match texinfoSpecialChar "@equiv{}"
244 syn match texinfoSpecialChar "@error{}"
245 syn match texinfoSpecialChar "@exclamdown{}"
246 syn match texinfoSpecialChar "@expansion{}"
247 syn match texinfoSpecialChar "@minus" contained "for tables and lists
248 syn match texinfoSpecialChar "@minus{}"
249 syn match texinfoSpecialChar "@OE{}"
250 syn match texinfoSpecialChar "@oe{}"
251 syn match texinfoSpecialChar "@point" contained "for tables and lists
252 syn match texinfoSpecialChar "@point{}"
253 syn match texinfoSpecialChar "@pounds{}"
254 syn match texinfoSpecialChar "@print{}"
255 syn match texinfoSpecialChar "@questiondown{}"
256 syn match texinfoSpecialChar "@result" contained "for tables and lists
257 syn match texinfoSpecialChar "@result{}"
258 syn match texinfoSpecialChar "@ss{}"
259 syn match texinfoSpecialChar "@TeX{}"
261 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@dmn{" end="}"
262 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@footnote{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
263 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@image{" end="}"
264 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@math{" end="}"
265 syn match texinfoAtCmd "@footnotestyle" nextgroup=texinfoSinglePar skipwhite
268 "making and preventing breaks (chap. 14 in Texinfo manual)
269 syn match texinfoSpecialChar "@\(\*\|-\|\.\)"
270 syn match texinfoAtCmd "^@need" nextgroup=texinfoSinglePar skipwhite
271 syn match texinfoAtCmd "^@page\s*$"
272 syn match texinfoAtCmd "^@sp" nextgroup=texinfoSinglePar skipwhite
273 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@group\s*$" end="^@end group\s*$" contains=ALL
274 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@hyphenation{" end="}"
275 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@w{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
278 "definition commands (chap. 15 in Texinfo manual)
279 syn match texinfoMltlnAtCmdFLine "^@def\k\+" contained
280 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@def\k\+" end="^@end def\k\+$" contains=ALL
282 "next 2 commands are from chap. 12; must be defined after @def* commands above to overwrite them
283 syn match texinfoAtCmd "@defcodeindex" nextgroup=texinfoIndexPar skipwhite
284 syn match texinfoAtCmd "@defindex" nextgroup=texinfoIndexPar skipwhite
287 "conditionally visible text (chap. 16 in Texinfo manual)
288 syn match texinfoAtCmd "^@clear" nextgroup=texinfoSinglePar skipwhite
289 syn region texinfoMltln2AtCmd matchgroup=texinfoAtCmd start="^@html\s*$" end="^@end html\s*$"
290 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifclear" end="^@end ifclear\s*$" contains=ALL
291 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifhtml" end="^@end ifhtml\s*$" contains=ALL
292 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifinfo" end="^@end ifinfo\s*$" contains=ALL
293 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifnothtml" end="^@end ifnothtml\s*$" contains=ALL
294 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifnotinfo" end="^@end ifnotinfo\s*$" contains=ALL
295 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifnottex" end="^@end ifnottex\s*$" contains=ALL
296 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifset" end="^@end ifset\s*$" contains=ALL
297 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@iftex" end="^@end iftex\s*$" contains=ALL
298 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@set " skip="\\$" end="$" contains=texinfoSpecialChar oneline
299 syn region texCommand start="\$\$" end="\$\$" contained
300 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@tex" end="^@end tex\s*$" contains=texCommand
301 syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@value{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
304 "internationalization (chap. 17 in Texinfo manual)
305 syn match texinfoAtCmd "@documentencoding" nextgroup=texinfoSinglePar skipwhite
306 syn match texinfoAtCmd "@documentlanguage" nextgroup=texinfoIndexPar skipwhite
309 "defining new texinfo commands (chap. 18 in Texinfo manual)
310 syn match texinfoAtCmd "@alias" nextgroup=texinfoAssignment skipwhite
311 syn match texinfoDIEPar "\S*\s*,\s*\S*\s*,\s*\S*\s*$" contained
312 syn match texinfoAtCmd "@definfoenclose" nextgroup=texinfoDIEPar skipwhite
313 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@macro" end="^@end macro\s*$" contains=ALL
316 "formatting hardcopy (chap. 19 in Texinfo manual)
317 syn match texinfoAtCmd "^@afourlatex\s*$"
318 syn match texinfoAtCmd "^@afourpaper\s*$"
319 syn match texinfoAtCmd "^@afourwide\s*$"
320 syn match texinfoAtCmd "^@finalout\s*$"
321 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@pagesizes" end="$" oneline
324 "creating and installing Info Files (chap. 20 in Texinfo manual)
325 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@dircategory" skip="\\$" end="$" oneline
326 syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@direntry\s*$" end="^@end direntry\s*$" contains=texinfoSpecialChar
327 syn match texinfoAtCmd "^@novalidate\s*$"
330 "include files (appendix E in Texinfo manual)
331 syn match texinfoAtCmd "^@include" nextgroup=texinfoSinglePar skipwhite
334 "page headings (appendix F in Texinfo manual)
335 syn match texinfoHFSpecialChar "@|" contained
336 syn match texinfoThisAtCmd "@thischapter" contained
337 syn match texinfoThisAtCmd "@thischaptername" contained
338 syn match texinfoThisAtCmd "@thisfile" contained
339 syn match texinfoThisAtCmd "@thispage" contained
340 syn match texinfoThisAtCmd "@thistitle" contained
341 syn match texinfoThisAtCmd "@today{}" contained
342 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@evenfooting" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline
343 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@evenheading" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline
344 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@everyfooting" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline
345 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@everyheading" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline
346 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@oddfooting" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline
347 syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@oddheading" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline
350 "refilling paragraphs (appendix H in Texinfo manual)
351 syn match texinfoAtCmd "@refill"
354 syn cluster texinfoAll contains=ALLBUT,{texinfoThisAtCmd,texinfoHFSpecialChar}
355 syn cluster texinfoReducedAll contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
356 "==============================================================================
359 " For version 5.7 and earlier: only when not done already
360 " For version 5.8 and later: only when an item doesn't have highlighting yet
361 if version >= 508 || !exists("did_texinfo_syn_inits")
364 let did_texinfo_syn_inits = 1
365 command -nargs=+ HiLink hi link <args>
367 command -nargs=+ HiLink hi def link <args>
370 HiLink texinfoSpecialChar Special
371 HiLink texinfoHFSpecialChar Special
373 HiLink texinfoError Error
374 HiLink texinfoIdent Identifier
375 HiLink texinfoAssignment Identifier
376 HiLink texinfoSinglePar Identifier
377 HiLink texinfoIndexPar Identifier
378 HiLink texinfoSIPar Identifier
379 HiLink texinfoDIEPar Identifier
380 HiLink texCommand PreProc
383 HiLink texinfoAtCmd Statement "@-command
384 HiLink texinfoPrmAtCmd String "@-command in one line with unknown nr. of parameters
385 "is String because is found as a region and is 'matchgroup'-ed
387 HiLink texinfoBrcPrmAtCmd String "@-command with parameter(s) in braces ({})
388 "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd
389 HiLink texinfoMltlnAtCmdFLine texinfoAtCmd "repeated embedded First lines in @-commands
390 HiLink texinfoMltlnAtCmd String "@-command in multiple lines
391 "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd
392 HiLink texinfoMltln2AtCmd PreProc "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors)
393 HiLink texinfoMltlnDMAtCmd PreProc "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors; used for @detailmenu, which can be included in @menu)
394 HiLink texinfoMltlnNAtCmd Normal "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors)
395 HiLink texinfoThisAtCmd Statement "@-command used in headers and footers (@this... series)
397 HiLink texinfoComment Comment
403 let b:current_syntax = "texinfo"
405 if main_syntax == 'texinfo'