xref: /vim-8.2.3635/runtime/syntax/texinfo.vim (revision f37506f6)
1071d4279SBram Moolenaar" Vim syntax file
2071d4279SBram Moolenaar" Language:	Texinfo (macro package for TeX)
3071d4279SBram Moolenaar" Maintainer:	Sandor Kopanyi <[email protected]>
4071d4279SBram Moolenaar" URL:		<->
5f4b8e57fSBram Moolenaar" Last Change:	2004 Jun 23
6071d4279SBram Moolenaar"
7071d4279SBram Moolenaar" the file follows the Texinfo manual structure; this file is based
8071d4279SBram Moolenaar" on manual for Texinfo version 4.0, 28 September 1999
9071d4279SBram Moolenaar" since @ can have special meanings, everything is 'match'-ed and 'region'-ed
10071d4279SBram Moolenaar" (including @ in 'iskeyword' option has unexpected effects)
11071d4279SBram Moolenaar
1289bcfda6SBram Moolenaar" quit when a syntax file was already loaded
1389bcfda6SBram Moolenaarif exists("b:current_syntax")
14071d4279SBram Moolenaar  finish
15071d4279SBram Moolenaarendif
16071d4279SBram Moolenaar
17071d4279SBram Moolenaarif !exists("main_syntax")
18071d4279SBram Moolenaar  let main_syntax = 'texinfo'
19071d4279SBram Moolenaarendif
20071d4279SBram Moolenaar
21071d4279SBram Moolenaar"in Texinfo can be real big things, like tables; sync for that
22071d4279SBram Moolenaarsyn sync lines=200
23071d4279SBram Moolenaar
24071d4279SBram Moolenaar"some general stuff
25071d4279SBram Moolenaar"syn match texinfoError     "\S" contained TODO
26071d4279SBram Moolenaarsyn match texinfoIdent	    "\k\+"		  contained "IDENTifier
27071d4279SBram Moolenaarsyn match texinfoAssignment "\k\+\s*=\s*\k\+\s*$" contained "assigment statement ( var = val )
28071d4279SBram Moolenaarsyn match texinfoSinglePar  "\k\+\s*$"		  contained "single parameter (used for several @-commands)
29071d4279SBram Moolenaarsyn match texinfoIndexPar   "\k\k\s*$"		  contained "param. used for different *index commands (+ @documentlanguage command)
30071d4279SBram Moolenaar
31071d4279SBram Moolenaar
32071d4279SBram Moolenaar"marking words and phrases (chap. 9 in Texinfo manual)
33071d4279SBram Moolenaar"(almost) everything appears as 'contained' too; is for tables (@table)
34071d4279SBram Moolenaar
35071d4279SBram Moolenaar"this chapter is at the beginning of this file to avoid overwritings
36071d4279SBram Moolenaar
37071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@acronym"		contained
38071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@acronym{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
39071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@b"		contained
40071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@b{"	end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
41071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@cite"		contained
42071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@cite{"	end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
43071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@code"		contained
44071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@code{"	end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
45071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@command"		contained
46071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@command{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
47071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@dfn"		contained
48071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@dfn{"	end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
49071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@email"		contained
50071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@email{"	end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
51071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@emph"		contained
52071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@emph{"	end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
53071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@env"		contained
54071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@env{"	end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
55071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@file"		contained
56071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@file{"	end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
57071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@i"		contained
58071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@i{"	end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
59071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@kbd"		contained
60071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@kbd{"	end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
61071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@key"		contained
62071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@key{"	end="}" contains=texinfoSpecialChar
63071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@option"		contained
64071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@option{"	end="}" contains=texinfoSpecialChar
65071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@r"		contained
66071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@r{"	end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
67071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@samp"		contained
68071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@samp{"	end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
69071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@sc"		contained
70071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@sc{"	end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
71071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@strong"		contained
72071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@strong{"	end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
73071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@t"		contained
74071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@t{"	end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
75071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@url"		contained
76071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@url{"	end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
77071d4279SBram Moolenaarsyn match texinfoSpecialChar				    "@var"		contained
78071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@var{"	end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
79071d4279SBram Moolenaarsyn match texinfoAtCmd "^@kbdinputstyle" nextgroup=texinfoSinglePar skipwhite
80071d4279SBram Moolenaar
81071d4279SBram Moolenaar
82071d4279SBram Moolenaar"overview of Texinfo (chap. 1 in Texinfo manual)
83071d4279SBram Moolenaarsyn match texinfoComment  "@c .*"
84071d4279SBram Moolenaarsyn match texinfoComment  "@c$"
85071d4279SBram Moolenaarsyn match texinfoComment  "@comment .*"
86071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd matchgroup=texinfoComment start="^@ignore\s*$" end="^@end ignore\s*$" contains=ALL
87071d4279SBram Moolenaar
88071d4279SBram Moolenaar
89071d4279SBram Moolenaar"beginning a Texinfo file (chap. 3 in Texinfo manual)
90071d4279SBram Moolenaarsyn region texinfoPrmAtCmd     matchgroup=texinfoAtCmd start="@center "		 skip="\\$" end="$"		       contains=texinfoSpecialChar,texinfoBrcPrmAtCmd oneline
91071d4279SBram Moolenaarsyn region texinfoMltlnDMAtCmd matchgroup=texinfoAtCmd start="^@detailmenu\s*$"		    end="^@end detailmenu\s*$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
92071d4279SBram Moolenaarsyn region texinfoPrmAtCmd     matchgroup=texinfoAtCmd start="^@setfilename "    skip="\\$" end="$" contains=texinfoSpecialChar oneline
93071d4279SBram Moolenaarsyn region texinfoPrmAtCmd     matchgroup=texinfoAtCmd start="^@settitle "       skip="\\$" end="$" contains=texinfoSpecialChar oneline
94071d4279SBram Moolenaarsyn region texinfoPrmAtCmd     matchgroup=texinfoAtCmd start="^@shorttitlepage " skip="\\$" end="$" contains=texinfoSpecialChar oneline
95071d4279SBram Moolenaarsyn region texinfoPrmAtCmd     matchgroup=texinfoAtCmd start="^@title "		 skip="\\$" end="$" contains=texinfoSpecialChar oneline
96071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd  matchgroup=texinfoAtCmd start="@titlefont{"		    end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
97071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd   matchgroup=texinfoAtCmd start="^@titlepage\s*$"		    end="^@end titlepage\s*$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoMltlnDMAtCmd,texinfoAtCmd,texinfoPrmAtCmd,texinfoMltlnAtCmd
98071d4279SBram Moolenaarsyn region texinfoPrmAtCmd     matchgroup=texinfoAtCmd start="^@vskip "		 skip="\\$" end="$" contains=texinfoSpecialChar oneline
99071d4279SBram Moolenaarsyn match texinfoAtCmd "^@exampleindent"     nextgroup=texinfoSinglePar skipwhite
100071d4279SBram Moolenaarsyn match texinfoAtCmd "^@headings"	     nextgroup=texinfoSinglePar skipwhite
101071d4279SBram Moolenaarsyn match texinfoAtCmd "^\\input"	     nextgroup=texinfoSinglePar skipwhite
102071d4279SBram Moolenaarsyn match texinfoAtCmd "^@paragraphindent"   nextgroup=texinfoSinglePar skipwhite
103071d4279SBram Moolenaarsyn match texinfoAtCmd "^@setchapternewpage" nextgroup=texinfoSinglePar skipwhite
104071d4279SBram Moolenaar
105071d4279SBram Moolenaar
106071d4279SBram Moolenaar"ending a Texinfo file (chap. 4 in Texinfo manual)
107071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="@author " skip="\\$" end="$" contains=texinfoSpecialChar oneline
108071d4279SBram Moolenaar"all below @bye should be comment TODO
109071d4279SBram Moolenaarsyn match texinfoAtCmd "^@bye\s*$"
110071d4279SBram Moolenaarsyn match texinfoAtCmd "^@contents\s*$"
111071d4279SBram Moolenaarsyn match texinfoAtCmd "^@printindex" nextgroup=texinfoIndexPar skipwhite
112071d4279SBram Moolenaarsyn match texinfoAtCmd "^@setcontentsaftertitlepage\s*$"
113071d4279SBram Moolenaarsyn match texinfoAtCmd "^@setshortcontentsaftertitlepage\s*$"
114071d4279SBram Moolenaarsyn match texinfoAtCmd "^@shortcontents\s*$"
115071d4279SBram Moolenaarsyn match texinfoAtCmd "^@summarycontents\s*$"
116071d4279SBram Moolenaar
117071d4279SBram Moolenaar
118071d4279SBram Moolenaar"chapter structuring (chap. 5 in Texinfo manual)
119071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendix"		 skip="\\$" end="$" contains=texinfoSpecialChar oneline
120071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsec"	 skip="\\$" end="$" contains=texinfoSpecialChar oneline
121071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsection"	 skip="\\$" end="$" contains=texinfoSpecialChar oneline
122071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsubsec"	 skip="\\$" end="$" contains=texinfoSpecialChar oneline
123071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsubsubsec"	 skip="\\$" end="$" contains=texinfoSpecialChar oneline
124071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@centerchap"		 skip="\\$" end="$" contains=texinfoSpecialChar oneline
125071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@chapheading"	 skip="\\$" end="$" contains=texinfoSpecialChar oneline
126071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@chapter"		 skip="\\$" end="$" contains=texinfoSpecialChar oneline
127071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@heading"		 skip="\\$" end="$" contains=texinfoSpecialChar oneline
128071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@majorheading"	 skip="\\$" end="$" contains=texinfoSpecialChar oneline
129071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@section"		 skip="\\$" end="$" contains=texinfoSpecialChar oneline
130071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subheading "	 skip="\\$" end="$" contains=texinfoSpecialChar oneline
131071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subsection"		 skip="\\$" end="$" contains=texinfoSpecialChar oneline
132071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subsubheading"	 skip="\\$" end="$" contains=texinfoSpecialChar oneline
133071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subsubsection"	 skip="\\$" end="$" contains=texinfoSpecialChar oneline
134071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subtitle"		 skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd oneline
135071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumbered"		 skip="\\$" end="$" contains=texinfoSpecialChar oneline
136071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumberedsec"	 skip="\\$" end="$" contains=texinfoSpecialChar oneline
137071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumberedsubsec"	 skip="\\$" end="$" contains=texinfoSpecialChar oneline
138071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumberedsubsubsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline
139071d4279SBram Moolenaarsyn match  texinfoAtCmd "^@lowersections\s*$"
140071d4279SBram Moolenaarsyn match  texinfoAtCmd "^@raisesections\s*$"
141071d4279SBram Moolenaar
142071d4279SBram Moolenaar
143071d4279SBram Moolenaar"nodes (chap. 6 in Texinfo manual)
144071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@anchor{"		  end="}"
145071d4279SBram Moolenaarsyn region texinfoPrmAtCmd    matchgroup=texinfoAtCmd start="^@top"    skip="\\$" end="$" contains=texinfoSpecialChar oneline
146071d4279SBram Moolenaarsyn region texinfoPrmAtCmd    matchgroup=texinfoAtCmd start="^@node"   skip="\\$" end="$" contains=texinfoSpecialChar oneline
147071d4279SBram Moolenaar
148071d4279SBram Moolenaar
149071d4279SBram Moolenaar"menus (chap. 7 in Texinfo manual)
150071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@menu\s*$" end="^@end menu\s*$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoMltlnDMAtCmd
151071d4279SBram Moolenaar
152071d4279SBram Moolenaar
153071d4279SBram Moolenaar"cross references (chap. 8 in Texinfo manual)
154071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@inforef{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
155071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@pxref{"   end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
156071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@ref{"     end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
157071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@uref{"    end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
158071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@xref{"    end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
159071d4279SBram Moolenaar
160071d4279SBram Moolenaar
161071d4279SBram Moolenaar"marking words and phrases (chap. 9 in Texinfo manual)
162071d4279SBram Moolenaar"(almost) everything appears as 'contained' too; is for tables (@table)
163071d4279SBram Moolenaar
164071d4279SBram Moolenaar"this chapter is at the beginning of this file to avoid overwritings
165071d4279SBram Moolenaar
166071d4279SBram Moolenaar
167071d4279SBram Moolenaar"quotations and examples (chap. 10 in Texinfo manual)
168071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@cartouche\s*$"	    end="^@end cartouche\s*$"	    contains=ALL
169071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@display\s*$"	    end="^@end display\s*$"	    contains=ALL
170071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@example\s*$"	    end="^@end example\s*$"	    contains=ALL
171071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@flushleft\s*$"	    end="^@end flushleft\s*$"	    contains=ALL
172071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@flushright\s*$"	    end="^@end flushright\s*$"	    contains=ALL
173071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@format\s*$"	    end="^@end format\s*$"	    contains=ALL
174071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@lisp\s*$"		    end="^@end lisp\s*$"	    contains=ALL
175071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@quotation\s*$"	    end="^@end quotation\s*$"	    contains=ALL
176071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smalldisplay\s*$"     end="^@end smalldisplay\s*$"    contains=ALL
177071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smallexample\s*$"     end="^@end smallexample\s*$"    contains=ALL
178071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smallformat\s*$"	    end="^@end smallformat\s*$"     contains=ALL
179071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smalllisp\s*$"	    end="^@end smalllisp\s*$"	    contains=ALL
180071d4279SBram Moolenaarsyn region texinfoPrmAtCmd   matchgroup=texinfoAtCmd start="^@exdent"	 skip="\\$" end="$"			    contains=texinfoSpecialChar oneline
181071d4279SBram Moolenaarsyn match texinfoAtCmd "^@noindent\s*$"
182071d4279SBram Moolenaarsyn match texinfoAtCmd "^@smallbook\s*$"
183071d4279SBram Moolenaar
184071d4279SBram Moolenaar
185071d4279SBram Moolenaar"lists and tables (chap. 11 in Texinfo manual)
186071d4279SBram Moolenaarsyn match texinfoAtCmd "@asis"		   contained
187071d4279SBram Moolenaarsyn match texinfoAtCmd "@columnfractions"  contained
188071d4279SBram Moolenaarsyn match texinfoAtCmd "@item"		   contained
189071d4279SBram Moolenaarsyn match texinfoAtCmd "@itemx"		   contained
190071d4279SBram Moolenaarsyn match texinfoAtCmd "@tab"		   contained
191071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd  matchgroup=texinfoAtCmd start="^@enumerate"  end="^@end enumerate\s*$"  contains=ALL
192071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd  matchgroup=texinfoAtCmd start="^@ftable"     end="^@end ftable\s*$"     contains=ALL
193071d4279SBram Moolenaarsyn region texinfoMltlnNAtCmd matchgroup=texinfoAtCmd start="^@itemize"    end="^@end itemize\s*$"    contains=ALL
194071d4279SBram Moolenaarsyn region texinfoMltlnNAtCmd matchgroup=texinfoAtCmd start="^@multitable" end="^@end multitable\s*$" contains=ALL
195071d4279SBram Moolenaarsyn region texinfoMltlnNAtCmd matchgroup=texinfoAtCmd start="^@table"      end="^@end table\s*$"      contains=ALL
196071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd  matchgroup=texinfoAtCmd start="^@vtable"     end="^@end vtable\s*$"     contains=ALL
197071d4279SBram Moolenaar
198071d4279SBram Moolenaar
199071d4279SBram Moolenaar"indices (chap. 12 in Texinfo manual)
200071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@\(c\|f\|k\|p\|t\|v\)index"   skip="\\$" end="$" contains=texinfoSpecialChar oneline
201071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@..index"			 skip="\\$" end="$" contains=texinfoSpecialChar oneline
202071d4279SBram Moolenaar"@defcodeindex and @defindex is defined after chap. 15's @def* commands (otherwise those ones will overwrite these ones)
203071d4279SBram Moolenaarsyn match texinfoSIPar "\k\k\s*\k\k\s*$" contained
204071d4279SBram Moolenaarsyn match texinfoAtCmd "^@syncodeindex" nextgroup=texinfoSIPar skipwhite
205071d4279SBram Moolenaarsyn match texinfoAtCmd "^@synindex"     nextgroup=texinfoSIPar skipwhite
206071d4279SBram Moolenaar
207071d4279SBram Moolenaar"special insertions (chap. 13 in Texinfo manual)
208071d4279SBram Moolenaarsyn match texinfoSpecialChar "@\(!\|?\|@\|\s\)"
209071d4279SBram Moolenaarsyn match texinfoSpecialChar "@{"
210071d4279SBram Moolenaarsyn match texinfoSpecialChar "@}"
211071d4279SBram Moolenaar"accents
212071d4279SBram Moolenaarsyn match texinfoSpecialChar "@=."
213071d4279SBram Moolenaarsyn match texinfoSpecialChar "@\('\|\"\|\^\|`\)[aeiouyAEIOUY]"
214071d4279SBram Moolenaarsyn match texinfoSpecialChar "@\~[aeinouyAEINOUY]"
215071d4279SBram Moolenaarsyn match texinfoSpecialChar "@dotaccent{.}"
216071d4279SBram Moolenaarsyn match texinfoSpecialChar "@H{.}"
217071d4279SBram Moolenaarsyn match texinfoSpecialChar "@,{[cC]}"
218071d4279SBram Moolenaarsyn match texinfoSpecialChar "@AA{}"
219071d4279SBram Moolenaarsyn match texinfoSpecialChar "@aa{}"
220071d4279SBram Moolenaarsyn match texinfoSpecialChar "@L{}"
221071d4279SBram Moolenaarsyn match texinfoSpecialChar "@l{}"
222071d4279SBram Moolenaarsyn match texinfoSpecialChar "@O{}"
223071d4279SBram Moolenaarsyn match texinfoSpecialChar "@o{}"
224071d4279SBram Moolenaarsyn match texinfoSpecialChar "@ringaccent{.}"
225071d4279SBram Moolenaarsyn match texinfoSpecialChar "@tieaccent{..}"
226071d4279SBram Moolenaarsyn match texinfoSpecialChar "@u{.}"
227071d4279SBram Moolenaarsyn match texinfoSpecialChar "@ubaraccent{.}"
228071d4279SBram Moolenaarsyn match texinfoSpecialChar "@udotaccent{.}"
229071d4279SBram Moolenaarsyn match texinfoSpecialChar "@v{.}"
230071d4279SBram Moolenaar"ligatures
231071d4279SBram Moolenaarsyn match texinfoSpecialChar "@AE{}"
232071d4279SBram Moolenaarsyn match texinfoSpecialChar "@ae{}"
233071d4279SBram Moolenaarsyn match texinfoSpecialChar "@copyright{}"
234071d4279SBram Moolenaarsyn match texinfoSpecialChar "@bullet" contained "for tables and lists
235071d4279SBram Moolenaarsyn match texinfoSpecialChar "@bullet{}"
236071d4279SBram Moolenaarsyn match texinfoSpecialChar "@dotless{i}"
237071d4279SBram Moolenaarsyn match texinfoSpecialChar "@dotless{j}"
238071d4279SBram Moolenaarsyn match texinfoSpecialChar "@dots{}"
239071d4279SBram Moolenaarsyn match texinfoSpecialChar "@enddots{}"
240071d4279SBram Moolenaarsyn match texinfoSpecialChar "@equiv" contained "for tables and lists
241071d4279SBram Moolenaarsyn match texinfoSpecialChar "@equiv{}"
242071d4279SBram Moolenaarsyn match texinfoSpecialChar "@error{}"
243071d4279SBram Moolenaarsyn match texinfoSpecialChar "@exclamdown{}"
244071d4279SBram Moolenaarsyn match texinfoSpecialChar "@expansion{}"
245071d4279SBram Moolenaarsyn match texinfoSpecialChar "@minus" contained "for tables and lists
246071d4279SBram Moolenaarsyn match texinfoSpecialChar "@minus{}"
247071d4279SBram Moolenaarsyn match texinfoSpecialChar "@OE{}"
248071d4279SBram Moolenaarsyn match texinfoSpecialChar "@oe{}"
249071d4279SBram Moolenaarsyn match texinfoSpecialChar "@point" contained "for tables and lists
250071d4279SBram Moolenaarsyn match texinfoSpecialChar "@point{}"
251071d4279SBram Moolenaarsyn match texinfoSpecialChar "@pounds{}"
252071d4279SBram Moolenaarsyn match texinfoSpecialChar "@print{}"
253071d4279SBram Moolenaarsyn match texinfoSpecialChar "@questiondown{}"
254071d4279SBram Moolenaarsyn match texinfoSpecialChar "@result" contained "for tables and lists
255071d4279SBram Moolenaarsyn match texinfoSpecialChar "@result{}"
256071d4279SBram Moolenaarsyn match texinfoSpecialChar "@ss{}"
257071d4279SBram Moolenaarsyn match texinfoSpecialChar "@TeX{}"
258071d4279SBram Moolenaar"other
259071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@dmn{"      end="}"
260071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@footnote{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
261071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@image{"    end="}"
262071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@math{"     end="}"
263071d4279SBram Moolenaarsyn match texinfoAtCmd "@footnotestyle" nextgroup=texinfoSinglePar skipwhite
264071d4279SBram Moolenaar
265071d4279SBram Moolenaar
266071d4279SBram Moolenaar"making and preventing breaks (chap. 14 in Texinfo manual)
267071d4279SBram Moolenaarsyn match texinfoSpecialChar  "@\(\*\|-\|\.\)"
268071d4279SBram Moolenaarsyn match texinfoAtCmd	      "^@need"	   nextgroup=texinfoSinglePar skipwhite
269071d4279SBram Moolenaarsyn match texinfoAtCmd	      "^@page\s*$"
270071d4279SBram Moolenaarsyn match texinfoAtCmd	      "^@sp"	   nextgroup=texinfoSinglePar skipwhite
271071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd  matchgroup=texinfoAtCmd start="^@group\s*$"   end="^@end group\s*$" contains=ALL
272071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@hyphenation{" end="}"
273071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@w{"	    end="}"		  contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
274071d4279SBram Moolenaar
275071d4279SBram Moolenaar
276071d4279SBram Moolenaar"definition commands (chap. 15 in Texinfo manual)
277071d4279SBram Moolenaarsyn match texinfoMltlnAtCmdFLine "^@def\k\+" contained
278071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@def\k\+" end="^@end def\k\+$"      contains=ALL
279071d4279SBram Moolenaar
280071d4279SBram Moolenaar"next 2 commands are from chap. 12; must be defined after @def* commands above to overwrite them
281071d4279SBram Moolenaarsyn match texinfoAtCmd "@defcodeindex" nextgroup=texinfoIndexPar skipwhite
282071d4279SBram Moolenaarsyn match texinfoAtCmd "@defindex" nextgroup=texinfoIndexPar skipwhite
283071d4279SBram Moolenaar
284071d4279SBram Moolenaar
285071d4279SBram Moolenaar"conditionally visible text (chap. 16 in Texinfo manual)
286071d4279SBram Moolenaarsyn match texinfoAtCmd "^@clear" nextgroup=texinfoSinglePar skipwhite
287071d4279SBram Moolenaarsyn region texinfoMltln2AtCmd matchgroup=texinfoAtCmd start="^@html\s*$"	end="^@end html\s*$"
288071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd  matchgroup=texinfoAtCmd start="^@ifclear"		end="^@end ifclear\s*$"   contains=ALL
289071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd  matchgroup=texinfoAtCmd start="^@ifhtml"		end="^@end ifhtml\s*$"	  contains=ALL
290071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd  matchgroup=texinfoAtCmd start="^@ifinfo"		end="^@end ifinfo\s*$"	  contains=ALL
291071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd  matchgroup=texinfoAtCmd start="^@ifnothtml"	end="^@end ifnothtml\s*$" contains=ALL
292071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd  matchgroup=texinfoAtCmd start="^@ifnotinfo"	end="^@end ifnotinfo\s*$" contains=ALL
293071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd  matchgroup=texinfoAtCmd start="^@ifnottex"	end="^@end ifnottex\s*$"  contains=ALL
294071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd  matchgroup=texinfoAtCmd start="^@ifset"		end="^@end ifset\s*$"	  contains=ALL
295071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd  matchgroup=texinfoAtCmd start="^@iftex"		end="^@end iftex\s*$"	  contains=ALL
296071d4279SBram Moolenaarsyn region texinfoPrmAtCmd    matchgroup=texinfoAtCmd start="^@set " skip="\\$" end="$" contains=texinfoSpecialChar oneline
297071d4279SBram Moolenaarsyn region texinfoTexCmd			      start="\$\$"		end="\$\$" contained
298071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd  matchgroup=texinfoAtCmd start="^@tex"		end="^@end tex\s*$"	  contains=texinfoTexCmd
299071d4279SBram Moolenaarsyn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@value{"		end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
300071d4279SBram Moolenaar
301071d4279SBram Moolenaar
302071d4279SBram Moolenaar"internationalization (chap. 17 in Texinfo manual)
303071d4279SBram Moolenaarsyn match texinfoAtCmd "@documentencoding" nextgroup=texinfoSinglePar skipwhite
304071d4279SBram Moolenaarsyn match texinfoAtCmd "@documentlanguage" nextgroup=texinfoIndexPar skipwhite
305071d4279SBram Moolenaar
306071d4279SBram Moolenaar
307071d4279SBram Moolenaar"defining new texinfo commands (chap. 18 in Texinfo manual)
308071d4279SBram Moolenaarsyn match texinfoAtCmd	"@alias"		      nextgroup=texinfoAssignment skipwhite
309071d4279SBram Moolenaarsyn match texinfoDIEPar "\S*\s*,\s*\S*\s*,\s*\S*\s*$" contained
310071d4279SBram Moolenaarsyn match texinfoAtCmd	"@definfoenclose"	      nextgroup=texinfoDIEPar	  skipwhite
311071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@macro" end="^@end macro\s*$" contains=ALL
312071d4279SBram Moolenaar
313071d4279SBram Moolenaar
314071d4279SBram Moolenaar"formatting hardcopy (chap. 19 in Texinfo manual)
315071d4279SBram Moolenaarsyn match texinfoAtCmd "^@afourlatex\s*$"
316071d4279SBram Moolenaarsyn match texinfoAtCmd "^@afourpaper\s*$"
317071d4279SBram Moolenaarsyn match texinfoAtCmd "^@afourwide\s*$"
318071d4279SBram Moolenaarsyn match texinfoAtCmd "^@finalout\s*$"
319071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@pagesizes" end="$" oneline
320071d4279SBram Moolenaar
321071d4279SBram Moolenaar
322071d4279SBram Moolenaar"creating and installing Info Files (chap. 20 in Texinfo manual)
323071d4279SBram Moolenaarsyn region texinfoPrmAtCmd   matchgroup=texinfoAtCmd start="^@dircategory"  skip="\\$" end="$" oneline
324071d4279SBram Moolenaarsyn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@direntry\s*$"	       end="^@end direntry\s*$" contains=texinfoSpecialChar
325071d4279SBram Moolenaarsyn match  texinfoAtCmd "^@novalidate\s*$"
326071d4279SBram Moolenaar
327071d4279SBram Moolenaar
328071d4279SBram Moolenaar"include files (appendix E in Texinfo manual)
329071d4279SBram Moolenaarsyn match texinfoAtCmd "^@include" nextgroup=texinfoSinglePar skipwhite
330071d4279SBram Moolenaar
331071d4279SBram Moolenaar
332071d4279SBram Moolenaar"page headings (appendix F in Texinfo manual)
333071d4279SBram Moolenaarsyn match texinfoHFSpecialChar "@|"		  contained
334071d4279SBram Moolenaarsyn match texinfoThisAtCmd     "@thischapter"	  contained
335071d4279SBram Moolenaarsyn match texinfoThisAtCmd     "@thischaptername" contained
336071d4279SBram Moolenaarsyn match texinfoThisAtCmd     "@thisfile"	  contained
337071d4279SBram Moolenaarsyn match texinfoThisAtCmd     "@thispage"	  contained
338071d4279SBram Moolenaarsyn match texinfoThisAtCmd     "@thistitle"	  contained
339071d4279SBram Moolenaarsyn match texinfoThisAtCmd     "@today{}"	  contained
340071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@evenfooting"  skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline
341071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@evenheading"  skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline
342071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@everyfooting" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline
343071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@everyheading" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline
344071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@oddfooting"   skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline
345071d4279SBram Moolenaarsyn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@oddheading"   skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline
346071d4279SBram Moolenaar
347071d4279SBram Moolenaar
348071d4279SBram Moolenaar"refilling paragraphs (appendix H in Texinfo manual)
349071d4279SBram Moolenaarsyn match  texinfoAtCmd "@refill"
350071d4279SBram Moolenaar
351071d4279SBram Moolenaar
352f4b8e57fSBram Moolenaarsyn cluster texinfoAll contains=ALLBUT,texinfoThisAtCmd,texinfoHFSpecialChar
353071d4279SBram Moolenaarsyn cluster texinfoReducedAll contains=texinfoSpecialChar,texinfoBrcPrmAtCmd
354071d4279SBram Moolenaar"==============================================================================
355071d4279SBram Moolenaar" highlighting
356071d4279SBram Moolenaar
35789bcfda6SBram Moolenaar" Only when an item doesn't have highlighting yet
358071d4279SBram Moolenaar
359*f37506f6SBram Moolenaarhi def link texinfoSpecialChar	Special
360*f37506f6SBram Moolenaarhi def link texinfoHFSpecialChar	Special
361071d4279SBram Moolenaar
362*f37506f6SBram Moolenaarhi def link texinfoError		Error
363*f37506f6SBram Moolenaarhi def link texinfoIdent		Identifier
364*f37506f6SBram Moolenaarhi def link texinfoAssignment	Identifier
365*f37506f6SBram Moolenaarhi def link texinfoSinglePar	Identifier
366*f37506f6SBram Moolenaarhi def link texinfoIndexPar	Identifier
367*f37506f6SBram Moolenaarhi def link texinfoSIPar		Identifier
368*f37506f6SBram Moolenaarhi def link texinfoDIEPar		Identifier
369*f37506f6SBram Moolenaarhi def link texinfoTexCmd		PreProc
370071d4279SBram Moolenaar
371071d4279SBram Moolenaar
372*f37506f6SBram Moolenaarhi def link texinfoAtCmd		Statement	"@-command
373*f37506f6SBram Moolenaarhi def link texinfoPrmAtCmd	String		"@-command in one line with unknown nr. of parameters
374071d4279SBram Moolenaar					      "is String because is found as a region and is 'matchgroup'-ed
375071d4279SBram Moolenaar					      "to texinfoAtCmd
376*f37506f6SBram Moolenaarhi def link texinfoBrcPrmAtCmd	String		"@-command with parameter(s) in braces ({})
377071d4279SBram Moolenaar					      "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd
378*f37506f6SBram Moolenaarhi def link texinfoMltlnAtCmdFLine  texinfoAtCmd	"repeated embedded First lines in @-commands
379*f37506f6SBram Moolenaarhi def link texinfoMltlnAtCmd	String		"@-command in multiple lines
380071d4279SBram Moolenaar					      "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd
381*f37506f6SBram Moolenaarhi def link texinfoMltln2AtCmd	PreProc		"@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors)
382*f37506f6SBram Moolenaarhi def link texinfoMltlnDMAtCmd	PreProc		"@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors; used for @detailmenu, which can be included in @menu)
383*f37506f6SBram Moolenaarhi def link texinfoMltlnNAtCmd	Normal		"@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors)
384*f37506f6SBram Moolenaarhi def link texinfoThisAtCmd	Statement	"@-command used in headers and footers (@this... series)
385071d4279SBram Moolenaar
386*f37506f6SBram Moolenaarhi def link texinfoComment	Comment
387071d4279SBram Moolenaar
388071d4279SBram Moolenaar
389071d4279SBram Moolenaar
390071d4279SBram Moolenaarlet b:current_syntax = "texinfo"
391071d4279SBram Moolenaar
392071d4279SBram Moolenaarif main_syntax == 'texinfo'
393071d4279SBram Moolenaar  unlet main_syntax
394071d4279SBram Moolenaarendif
395071d4279SBram Moolenaar
396071d4279SBram Moolenaar" vim: ts=8
397