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