Mercurial > vim
comparison runtime/syntax/mf.vim @ 10244:876fbdd84e52
commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 1 14:47:05 2016 +0200
Updated runtime files.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 01 Oct 2016 15:00:04 +0200 |
parents | 46763b01cd9a |
children | 2acb87ee55fc |
comparison
equal
deleted
inserted
replaced
10243:fe057ff11e5f | 10244:876fbdd84e52 |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: Metafont | 2 " Language: METAFONT |
3 " Maintainer: Andreas Scherer <andreas.scherer@pobox.com> | 3 " Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com> |
4 " Last Change: April 25, 2001 | 4 " Former Maintainers: Andreas Scherer <andreas.scherer@pobox.com> |
5 | 5 " Last Change: 2016 Oct 1 |
6 " quit when a syntax file was already loaded | 6 |
7 if exists("b:current_syntax") | 7 if exists("b:current_syntax") |
8 finish | 8 finish |
9 endif | 9 endif |
10 | 10 |
11 " Metafont 'primitives' as defined in chapter 25 of 'The METAFONTbook' | 11 syn iskeyword @,_ |
12 | |
13 " METAFONT 'primitives' as defined in chapter 25 of 'The METAFONTbook' | |
12 " Page 210: 'boolean expressions' | 14 " Page 210: 'boolean expressions' |
13 syn keyword mfBoolExp true false known unknown odd charexists not and or | 15 syn keyword mfBoolExp and charexists false known not odd or true unknown |
14 | 16 |
15 " Page 210: 'numeric expression' | 17 " Page 210: 'numeric expression' |
16 syn keyword mfNumExp normaldeviate length ASCII oct hex angle turningnumber | 18 syn keyword mfNumExp ASCII angle cosd directiontime floor hex length |
17 syn keyword mfNumExp totalweight directiontime xpart ypart xxpart xypart | 19 syn keyword mfNumExp mexp mlog normaldeviate oct sind sqrt totalweight |
18 syn keyword mfNumExp yxpart yypart sqrt sind cosd mlog mexp floor | 20 syn keyword mfNumExp turningnumber uniformdeviate xpart xxpart xypart |
19 syn keyword mfNumExp uniformdeviate | 21 syn keyword mfNumExp ypart yxpart yypart |
20 | 22 |
21 " Page 211: 'internal quantities' | 23 " Page 211: 'internal quantities' |
22 syn keyword mfInternal tracingtitles tracingequations tracingcapsules | 24 syn keyword mfInternal autorounding boundarychar charcode chardp chardx |
23 syn keyword mfInternal tracingchoices tracingspecs tracingpens | 25 syn keyword mfInternal chardy charext charht charic charwd day designsize |
24 syn keyword mfInternal tracingcommands tracingrestores tracingmacros | 26 syn keyword mfInternal fillin fontmaking granularity hppp jobname month |
25 syn keyword mfInternal tracingedges tracingoutput tracingonline tracingstats | 27 syn keyword mfInternal pausing proofing showstopping smoothing time |
26 syn keyword mfInternal pausing showstopping fontmaking proofing | 28 syn keyword mfInternal tracingcapsules tracingchoices tracingcommands |
27 syn keyword mfInternal turningcheck warningcheck smoothing autorounding | 29 syn keyword mfInternal tracingedges tracingequations tracingmacros |
28 syn keyword mfInternal granularity fillin year month day time | 30 syn keyword mfInternal tracingonline tracingoutput tracingpens |
29 syn keyword mfInternal charcode charext charwd charht chardp charic | 31 syn keyword mfInternal tracingrestores tracingspecs tracingstats |
30 syn keyword mfInternal chardx chardy designsize hppp vppp xoffset yoffset | 32 syn keyword mfInternal tracingtitles turningcheck vppp warningcheck |
31 syn keyword mfInternal boundarychar | 33 syn keyword mfInternal xoffset year yoffset |
32 | 34 |
33 " Page 212: 'pair expressions' | 35 " Page 212: 'pair expressions' |
34 syn keyword mfPairExp point of precontrol postcontrol penoffset rotated | 36 syn keyword mfPairExp of penoffset point postcontrol precontrol rotated |
35 syn keyword mfPairExp scaled shifted slanted transformed xscaled yscaled | 37 syn keyword mfPairExp scaled shifted slanted transformed xscaled yscaled |
36 syn keyword mfPairExp zscaled | 38 syn keyword mfPairExp zscaled |
37 | 39 |
38 " Page 213: 'path expressions' | 40 " Page 213: 'path expressions' |
39 syn keyword mfPathExp makepath reverse subpath curl tension atleast | 41 syn keyword mfPathExp atleast controls curl cycle makepath reverse |
40 syn keyword mfPathExp controls cycle | 42 syn keyword mfPathExp subpath tension |
41 | 43 |
42 " Page 214: 'pen expressions' | 44 " Page 214: 'pen expressions' |
43 syn keyword mfPenExp nullpen pencircle makepen | 45 syn keyword mfPenExp makepen nullpen pencircle |
44 | 46 |
45 " Page 214: 'picutre expressions' | 47 " Page 214: 'picture expressions' |
46 syn keyword mfPicExp nullpicture | 48 syn keyword mfPicExp nullpicture |
47 | 49 |
48 " Page 214: 'string expressions' | 50 " Page 214: 'string expressions' |
49 syn keyword mfStringExp jobname readstring str char decimal substring | 51 syn keyword mfStringExp char decimal readstring str substring |
50 | 52 |
51 " Page 217: 'commands and statements' | 53 " Page 217: 'commands and statements' |
52 syn keyword mfCommand end dump save interim newinternal randomseed let | 54 syn keyword mfCommand addto also at batchmode contour cull delimiters |
53 syn keyword mfCommand delimiters outer everyjob show showvariable showtoken | 55 syn keyword mfCommand display doublepath dropping dump end errhelp |
54 syn keyword mfCommand showdependencies showstats message errmessage errhelp | 56 syn keyword mfCommand errmessage errorstopmode everyjob from interim |
55 syn keyword mfCommand batchmode nonstopmode scrollmode errorstopmode | 57 syn keyword mfCommand inwindow keeping let message newinternal |
56 syn keyword mfCommand addto also contour doublepath withpen withweight cull | 58 syn keyword mfCommand nonstopmode numspecial openwindow outer randomseed |
57 syn keyword mfCommand keeping dropping display inwindow openwindow at from to | 59 syn keyword mfCommand save scrollmode shipout show showdependencies |
58 syn keyword mfCommand shipout special numspecial | 60 syn keyword mfCommand showstats showtoken showvariable special to withpen |
61 syn keyword mfCommand withweight | |
59 | 62 |
60 " Page 56: 'types' | 63 " Page 56: 'types' |
61 syn keyword mfType boolean numeric pair path pen picture string transform | 64 syn keyword mfType boolean numeric pair path pen picture string |
65 syn keyword mfType transform | |
62 | 66 |
63 " Page 155: 'grouping' | 67 " Page 155: 'grouping' |
64 syn keyword mfStatement begingroup endgroup | 68 syn keyword mfStatement begingroup endgroup |
65 | 69 |
66 " Page 165: 'definitions' | 70 " Page 165: 'definitions' |
67 syn keyword mfDefinition enddef def expr suffix text primary secondary | 71 syn keyword mfDefinition def enddef expr primary primarydef secondary |
68 syn keyword mfDefinition tertiary vardef primarydef secondarydef tertiarydef | 72 syn keyword mfDefinition secondarydef suffix tertiary tertiarydef text |
73 syn keyword mfDefinition vardef | |
69 | 74 |
70 " Page 169: 'conditions and loops' | 75 " Page 169: 'conditions and loops' |
71 syn keyword mfCondition if fi else elseif endfor for forsuffixes forever | 76 syn keyword mfCondition else elseif endfor exitif fi for forever |
72 syn keyword mfCondition step until exitif | 77 syn keyword mfCondition forsuffixes if step until |
73 | 78 |
74 " Other primitives listed in the index | 79 " Other primitives listed in the index |
75 syn keyword mfPrimitive charlist endinput expandafter extensible | 80 syn keyword mfPrimitive charlist endinput expandafter extensible fontdimen |
76 syn keyword mfPrimitive fontdimen headerbyte inner input intersectiontimes | 81 syn keyword mfPrimitive headerbyte inner input intersectiontimes kern |
77 syn keyword mfPrimitive kern ligtable quote scantokens skipto | 82 syn keyword mfPrimitive ligtable quote scantokens skipto |
83 | |
84 " Implicit suffix parameters | |
85 syn match mfSuffixParam "@#\|#@\|@" | |
86 | |
87 " These are just tags, but given their special status, we | |
88 " highlight them as variables | |
89 syn keyword mfVariable x y | |
78 | 90 |
79 " Keywords defined by plain.mf (defined on pp.262-278) | 91 " Keywords defined by plain.mf (defined on pp.262-278) |
80 if !exists("plain_mf_macros") | 92 if get(g:, "plain_mf_macros", 1) |
81 let plain_mf_macros = 1 " Set this to '0' if your source gets too colourful | 93 syn keyword mfDef addto_currentpicture beginchar capsule_def |
82 " metapost.vim does so to turn off Metafont macros | 94 syn keyword mfDef change_width clear_pen_memory clearit clearpen |
83 endif | 95 syn keyword mfDef clearxy culldraw cullit cutdraw |
84 if plain_mf_macros | 96 syn keyword mfDef define_blacker_pixels define_corrected_pixels |
85 syn keyword mfMacro abs addto_currentpicture aspect_ratio base_name | 97 syn keyword mfDef define_good_x_pixels define_good_y_pixels |
86 syn keyword mfMacro base_version beginchar blacker blankpicture bot bye byte | 98 syn keyword mfDef define_horizontal_corrected_pixels define_pixels |
87 syn keyword mfMacro capsule_def ceiling change_width clear_pen_memory clearit | 99 syn keyword mfDef define_whole_blacker_pixels define_whole_pixels |
88 syn keyword mfMacro clearpen clearxy counterclockwise culldraw cullit | 100 syn keyword mfDef define_whole_vertical_blacker_pixels |
89 syn keyword mfMacro currentpen currentpen_path currentpicture | 101 syn keyword mfDef define_whole_vertical_pixels downto draw drawdot |
90 syn keyword mfMacro currenttransform currentwindow cutdraw cutoff d decr | 102 syn keyword mfDef endchar erase exitunless fill filldraw fix_units |
91 syn keyword mfMacro define_blacker_pixels define_corrected_pixels | 103 syn keyword mfDef flex font_coding_scheme font_extra_space |
92 syn keyword mfMacro define_good_x_pixels define_good_y_pixels | 104 syn keyword mfDef font_identifier font_normal_shrink |
93 syn keyword mfMacro define_horizontal_corrected_pixels define_pixels | 105 syn keyword mfDef font_normal_space font_normal_stretch font_quad |
94 syn keyword mfMacro define_whole_blacker_pixels define_whole_pixels | 106 syn keyword mfDef font_size font_slant font_x_height gfcorners gobble |
95 syn keyword mfMacro define_whole_vertical_blacker_pixels | 107 syn keyword mfDef hide imagerules interact italcorr killtext |
96 syn keyword mfMacro define_whole_vertical_pixels dir direction directionpoint | 108 syn keyword mfDef loggingall lowres_fix makebox makegrid maketicks |
97 syn keyword mfMacro displaying ditto div dotprod down downto draw drawdot | 109 syn keyword mfDef mode_def mode_setup nodisplays notransforms numtok |
98 syn keyword mfMacro endchar eps epsilon extra_beginchar extra_endchar | 110 syn keyword mfDef openit penrazor pensquare penstroke pickup |
99 syn keyword mfMacro extra_setup erase exitunless fill filldraw fix_units flex | 111 syn keyword mfDef proofoffset proofrule range reflectedabout |
100 syn keyword mfMacro font_coding_scheme font_extra_space font_identifier | 112 syn keyword mfDef rotatedaround screenchars screenrule screenstrokes |
101 syn keyword mfMacro font_normal_shrink font_normal_space font_normal_stretch | 113 syn keyword mfDef shipit showit smode stop superellipse takepower |
102 syn keyword mfMacro font_quad font_setup font_size font_slant font_x_height | 114 syn keyword mfDef tracingall tracingnone undraw undrawdot unfill |
103 syn keyword mfMacro fullcircle generate gfcorners gobble gobbled grayfont h | 115 syn keyword mfDef unfilldraw upto z |
104 syn keyword mfMacro halfcircle hide hround identity image_rules incr infinity | 116 syn match mfDef "???" |
105 syn keyword mfMacro interact interpath intersectionpoint inverse italcorr | 117 syn keyword mfVardef bot byte ceiling counterclockwise cutoff decr dir |
106 syn keyword mfMacro join_radius killtext labelfont labels left lft localfont | 118 syn keyword mfVardef direction directionpoint grayfont hround incr |
107 syn keyword mfMacro loggingall lowres lowres_fix mag magstep makebox makegrid | 119 syn keyword mfVardef interpath inverse labelfont labels lft magstep |
108 syn keyword mfMacro makelabel maketicks max min mod mode mode_def mode_name | 120 " Note: nodot is not a vardef, it is used as in makelabel.lft.nodot("5",z5) |
109 syn keyword mfMacro mode_setup nodisplays notransforms number_of_modes numtok | 121 " (METAFONT only) |
110 syn keyword mfMacro o_correction openit origin pen_bot pen_lft pen_rt pen_top | 122 syn keyword mfVardef makelabel max min nodot penlabels penpos |
111 syn keyword mfMacro penlabels penpos penrazor penspeck pensquare penstroke | 123 syn keyword mfVardef proofrulethickness round rt savepen slantfont solve |
112 syn keyword mfMacro pickup pixels_per_inch proof proofoffset proofrule | 124 syn keyword mfVardef tensepath titlefont top unitvector vround whatever |
113 syn keyword mfMacro proofrulethickness quartercircle range reflectedabout | 125 syn match mpVardef "\<good\.\%(x\|y\|lft\|rt\|top\|bot\)\>" |
114 syn keyword mfMacro relax right rotatedabout rotatedaround round rt rulepen | 126 syn keyword mfPrimaryDef div dotprod gobbled mod |
115 syn keyword mfMacro savepen screenchars screen_rows screen_cols screenrule | 127 syn keyword mfSecondaryDef intersectionpoint |
116 syn keyword mfMacro screenstrokes shipit showit slantfont smode smoke softjoin | 128 syn keyword mfTertiaryDef softjoin thru |
117 syn keyword mfMacro solve stop superellipse takepower tensepath titlefont | 129 syn keyword mfNewInternal blacker currentwindow displaying eps epsilon |
118 syn keyword mfMacro tolerance top tracingall tracingnone undraw undrawdot | 130 syn keyword mfNewInternal infinity join_radius number_of_modes o_correction |
119 syn keyword mfMacro unfill unfilldraw unitpixel unitsquare unitvector up upto | 131 syn keyword mfNewInternal pen_bot pen_lft pen_rt pen_top pixels_per_inch |
120 syn keyword mfMacro vround w whatever | 132 syn keyword mfNewInternal screen_cols screen_rows tolerance |
133 " Predefined constants | |
134 syn keyword mfConstant base_name base_version blankpicture ditto down | |
135 syn keyword mfConstant fullcircle halfcircle identity left lowres origin | |
136 syn keyword mfConstant penspeck proof quartercircle right rulepen smoke | |
137 syn keyword mfConstant unitpixel unitsquare up | |
138 " Other predefined variables | |
139 syn keyword mfVariable aspect_ratio currentpen extra_beginchar | |
140 syn keyword mfVariable extra_endchar currentpen_path currentpicture | |
141 syn keyword mfVariable currenttransform d extra_setup h localfont mag mode | |
142 syn keyword mfVariable mode_name w | |
143 " let statements: | |
144 syn keyword mfnumExp abs | |
145 syn keyword mfPairExp rotatedabout | |
146 syn keyword mfCommand bye relax | |
147 endif | |
148 | |
149 " By default, METAFONT loads modes.mf, too | |
150 if get(g:, "plain_mf_modes", 1) | |
151 syn keyword mfConstant APSSixMed AgfaFourZeroZero AgfaThreeFourZeroZero | |
152 syn keyword mfConstant AtariNineFive AtariNineSix AtariSLMEightZeroFour | |
153 syn keyword mfConstant AtariSMOneTwoFour CItohEightFiveOneZero | |
154 syn keyword mfConstant CItohThreeOneZero CanonBJCSixZeroZero CanonCX | |
155 syn keyword mfConstant CanonEX CanonLBPLX CanonLBPTen CanonSX ChelgraphIBX | |
156 syn keyword mfConstant CompugraphicEightSixZeroZero | |
157 syn keyword mfConstant CompugraphicNineSixZeroZero DD DEClarge DECsmall | |
158 syn keyword mfConstant DataDiscNew EightThree EpsonAction | |
159 syn keyword mfConstant EpsonLQFiveZeroZeroLo EpsonLQFiveZeroZeroMed | |
160 syn keyword mfConstant EpsonMXFX EpsonSQEightSevenZero EpsonStylusPro | |
161 syn keyword mfConstant EpsonStylusProHigh EpsonStylusProLow | |
162 syn keyword mfConstant EpsonStylusProMed FourFour GThreefax HPDeskJet | |
163 syn keyword mfConstant HPLaserJetIIISi IBMFourTwoFiveZero IBMFourTwoOneSix | |
164 syn keyword mfConstant IBMFourTwoThreeZero IBMFourZeroOneNine | |
165 syn keyword mfConstant IBMFourZeroThreeNine IBMFourZeroTwoNine | |
166 syn keyword mfConstant IBMProPrinter IBMSixOneFiveFour IBMSixSixSevenZero | |
167 syn keyword mfConstant IBMThreeEightOneTwo IBMThreeEightTwoZero | |
168 syn keyword mfConstant IBMThreeOneNineThree IBMThreeOneSevenNine | |
169 syn keyword mfConstant IBMUlfHolleberg LASevenFive LNOthreR LNOthree | |
170 syn keyword mfConstant LNZeroOne LNZeroThree LPSFourZero LPSTwoZero | |
171 syn keyword mfConstant LexmarkFourZeroThreeNine LexmarkOptraR | |
172 syn keyword mfConstant LexmarkOptraS LinotypeLThreeThreeZero | |
173 syn keyword mfConstant LinotypeOneZeroZero LinotypeOneZeroZeroLo | |
174 syn keyword mfConstant LinotypeThreeZeroZeroHi MacTrueSize NeXTprinter | |
175 syn keyword mfConstant NeXTscreen NecTwoZeroOne Newgen NineOne | |
176 syn keyword mfConstant OCESixSevenFiveZeroPS OneTwoZero OneZeroZero | |
177 syn keyword mfConstant PrintwareSevenTwoZeroIQ Prism QMSOneSevenTwoFive | |
178 syn keyword mfConstant QMSOneSevenZeroZero QMSTwoFourTwoFive RicohA | |
179 syn keyword mfConstant RicohFortyEighty RicohFourZeroEightZero RicohLP | |
180 syn keyword mfConstant SparcPrinter StarNLOneZero VAXstation VTSix | |
181 syn keyword mfConstant VarityperFiveZeroSixZeroW | |
182 syn keyword mfConstant VarityperFourThreeZeroZeroHi | |
183 syn keyword mfConstant VarityperFourThreeZeroZeroLo | |
184 syn keyword mfConstant VarityperFourTwoZeroZero VarityperSixZeroZero | |
185 syn keyword mfConstant XeroxDocutech XeroxEightSevenNineZero | |
186 syn keyword mfConstant XeroxFourZeroFiveZero XeroxNineSevenZeroZero | |
187 syn keyword mfConstant XeroxPhaserSixTwoZeroZeroDP XeroxThreeSevenZeroZero | |
188 syn keyword mfConstant Xerox_world agfafzz agfatfzz amiga aps apssixhi | |
189 syn keyword mfConstant aselect atariezf atarinf atarins atariotf bitgraph | |
190 syn keyword mfConstant bjtenex bjtzzex bjtzzl bjtzzs boise canonbjc | |
191 syn keyword mfConstant canonex canonlbp cg cgl cgnszz citohtoz corona crs | |
192 syn keyword mfConstant cthreeten cx datadisc declarge decsmall deskjet | |
193 syn keyword mfConstant docutech dover dp dpdfezzz eighthre elvira epscszz | |
194 syn keyword mfConstant epsdraft epsdrft epsdrftl epsfast epsfastl epshi | |
195 syn keyword mfConstant epslo epsmed epsmedl epson epsonact epsonfx epsonl | |
196 syn keyword mfConstant epsonlo epsonlol epsonlq epsonsq epstylus epstylwr | |
197 syn keyword mfConstant epstyplo epstypmd epstypml epstypro epswlo epswlol | |
198 syn keyword mfConstant esphi fourfour gpx gtfax gtfaxhi gtfaxl gtfaxlo | |
199 syn keyword mfConstant gtfaxlol help hifax highfax hplaser hprugged ibm_a | |
200 syn keyword mfConstant ibmd ibmega ibmegal ibmfzon ibmfztn ibmpp ibmppl | |
201 syn keyword mfConstant ibmsoff ibmteot ibmtetz ibmtont ibmtosn ibmtosnl | |
202 syn keyword mfConstant ibmvga ibx imagen imagewriter itoh itohl itohtoz | |
203 syn keyword mfConstant itohtozl iw jetiiisi kyocera laserjet laserjetfive | |
204 syn keyword mfConstant laserjetfivemp laserjetfour laserjetfourthousand | |
205 syn keyword mfConstant laserjetfourzerozerozero laserjethi laserjetlo | |
206 syn keyword mfConstant laserjettwoonezerozero | |
207 syn keyword mfConstant laserjettwoonezerozerofastres lasermaster | |
208 syn keyword mfConstant laserwriter lasf lexmarkr lexmarks lexmarku | |
209 syn keyword mfConstant linohalf linohi linolo linolttz linoone linosuper | |
210 syn keyword mfConstant linothree linothreelo linotzzh ljfive ljfivemp | |
211 syn keyword mfConstant ljfour ljfzzz ljfzzzfr ljlo ljtozz ljtozzfr lmaster | |
212 syn keyword mfConstant lnotr lnzo lps lpstz lqhires lqlores lqmed lqmedl | |
213 syn keyword mfConstant lqmedres lview lviewl lwpro macmag mactrue modes_mf | |
214 syn keyword mfConstant ncd nec nechi neclm nectzo newdd newddl nexthi | |
215 syn keyword mfConstant nextscreen nextscrn nineone nullmode ocessfz | |
216 syn keyword mfConstant okidata okidatal okifourten okifte okihi onetz | |
217 syn keyword mfConstant onezz pcprevw pcscreen phaser phaserfs phasertf | |
218 syn keyword mfConstant phasertfl phasertl pixpt printware prntware | |
219 syn keyword mfConstant proprinter qms qmsesz qmsostf qmsoszz qmstftf ricoh | |
220 syn keyword mfConstant ricoha ricohlp ricohsp sherpa sparcptr starnlt | |
221 syn keyword mfConstant starnltl styletwo stylewr stylewri stylewriter sun | |
222 syn keyword mfConstant supre swtwo toshiba ultre varityper vs vtftzz | |
223 syn keyword mfConstant vtftzzhi vtftzzlo vtfzszw vtszz xpstzz xpstzzl | |
224 syn keyword mfConstant xrxesnz xrxfzfz xrxnszz xrxtszz | |
225 syn keyword mfDef BCPL_string coding_scheme font_face_byte | |
226 syn keyword mfDef font_family landscape | |
227 syn keyword mfDef mode_extra_info mode_help mode_param | |
228 syn keyword mfNewInternal blacker_min | |
121 endif | 229 endif |
122 | 230 |
123 " Some other basic macro names, e.g., from cmbase, logo, etc. | 231 " Some other basic macro names, e.g., from cmbase, logo, etc. |
124 if !exists("other_mf_macros") | 232 if get(g:, "other_mf_macros", 1) |
125 let other_mf_macros = 1 " Set this to '0' if your code gets too colourful | 233 syn keyword mfDef beginlogochar |
126 " metapost.vim does so to turn off Metafont macros | 234 syn keyword mfDef font_setup |
127 endif | 235 syn keyword mfPrimitive generate |
128 if other_mf_macros | |
129 syn keyword mfMacro beginlogochar | |
130 endif | 236 endif |
131 | 237 |
132 " Numeric tokens | 238 " Numeric tokens |
133 syn match mfNumeric "[-]\=\d\+" | 239 syn match mfNumeric "[-]\=\d\+" |
134 syn match mfNumeric "[-]\=\.\d\+" | 240 syn match mfNumeric "[-]\=\.\d\+" |
135 syn match mfNumeric "[-]\=\d\+\.\d\+" | 241 syn match mfNumeric "[-]\=\d\+\.\d\+" |
136 | 242 |
137 " Metafont lengths | 243 " METAFONT lengths |
138 syn match mfLength "\<\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\>" | 244 syn match mfLength "\<\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\>" |
139 syn match mfLength "\<[-]\=\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>" | 245 syn match mfLength "[-]\=\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=" |
140 syn match mfLength "\<[-]\=\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>" | 246 syn match mfLength "[-]\=\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=" |
141 syn match mfLength "\<[-]\=\d\+\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>" | 247 syn match mfLength "[-]\=\d\+\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=" |
142 | |
143 " Metafont coordinates and points | |
144 syn match mfCoord "\<[xy]\d\+\>" | |
145 syn match mfPoint "\<z\d\+\>" | |
146 | 248 |
147 " String constants | 249 " String constants |
148 syn region mfString start=+"+ end=+"+ | 250 syn match mfOpenString /"[^"]*/ |
251 syn region mfString oneline keepend start=+"+ end=+"+ | |
149 | 252 |
150 " Comments: | 253 " Comments: |
151 syn match mfComment "%.*$" | 254 syn keyword mfTodoComment contained TODO FIXME XXX DEBUG NOTE |
255 syn match mfComment "%.*$" contains=mfTodoComment,@Spell | |
152 | 256 |
153 " synchronizing | 257 " synchronizing |
154 syn sync maxlines=50 | 258 syn sync maxlines=50 |
155 | 259 |
156 " Define the default highlighting | 260 " Define the default highlighting |
157 " Only when an item doesn't have highlighting yet | 261 hi def link mfBoolExp Statement |
158 | 262 hi def link mfNumExp Statement |
159 hi def link mfBoolExp Statement | 263 hi def link mfPairExp Statement |
160 hi def link mfNumExp Statement | 264 hi def link mfPathExp Statement |
161 hi def link mfInternal Identifier | 265 hi def link mfPenExp Statement |
162 hi def link mfPairExp Statement | 266 hi def link mfPicExp Statement |
163 hi def link mfPathExp Statement | 267 hi def link mfStringExp Statement |
164 hi def link mfPenExp Statement | 268 hi def link mfInternal Identifier |
165 hi def link mfPicExp Statement | 269 hi def link mfCommand Statement |
166 hi def link mfStringExp Statement | 270 hi def link mfType Type |
167 hi def link mfCommand Statement | 271 hi def link mfStatement Statement |
168 hi def link mfType Type | 272 hi def link mfDefinition Statement |
169 hi def link mfStatement Statement | 273 hi def link mfCondition Conditional |
170 hi def link mfDefinition Statement | 274 hi def link mfPrimitive Statement |
171 hi def link mfCondition Conditional | 275 hi def link mfDef Function |
172 hi def link mfPrimitive Statement | 276 hi def link mfVardef mfDef |
173 hi def link mfMacro Macro | 277 hi def link mfPrimaryDef mfDef |
174 hi def link mfCoord Identifier | 278 hi def link mfSecondaryDef mfDef |
175 hi def link mfPoint Identifier | 279 hi def link mfTertiaryDef mfDef |
176 hi def link mfNumeric Number | 280 hi def link mfCoord Identifier |
177 hi def link mfLength Number | 281 hi def link mfPoint Identifier |
178 hi def link mfComment Comment | 282 hi def link mfNumeric Number |
179 hi def link mfString String | 283 hi def link mfLength Number |
180 | 284 hi def link mfComment Comment |
285 hi def link mfString String | |
286 hi def link mfOpenString Todo | |
287 hi def link mfSuffixParam Label | |
288 hi def link mfNewInternal mfInternal | |
289 hi def link mfVariable Identifier | |
290 hi def link mfConstant Constant | |
291 hi def link mfTodoComment Todo | |
181 | 292 |
182 let b:current_syntax = "mf" | 293 let b:current_syntax = "mf" |
183 | 294 |
184 " vim: ts=8 | 295 " vim:sw=2 |