Mercurial > vim
annotate runtime/syntax/mf.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | 3fc0f57ecb91 |
children | 46763b01cd9a |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Metafont | |
3 " Maintainer: Andreas Scherer <andreas.scherer@pobox.com> | |
4 " Last Change: April 25, 2001 | |
5 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
6 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
7 if exists("b:current_syntax") |
7 | 8 finish |
9 endif | |
10 | |
11 " Metafont 'primitives' as defined in chapter 25 of 'The METAFONTbook' | |
12 " Page 210: 'boolean expressions' | |
13 syn keyword mfBoolExp true false known unknown odd charexists not and or | |
14 | |
15 " Page 210: 'numeric expression' | |
16 syn keyword mfNumExp normaldeviate length ASCII oct hex angle turningnumber | |
17 syn keyword mfNumExp totalweight directiontime xpart ypart xxpart xypart | |
18 syn keyword mfNumExp yxpart yypart sqrt sind cosd mlog mexp floor | |
19 syn keyword mfNumExp uniformdeviate | |
20 | |
21 " Page 211: 'internal quantities' | |
22 syn keyword mfInternal tracingtitles tracingequations tracingcapsules | |
23 syn keyword mfInternal tracingchoices tracingspecs tracingpens | |
24 syn keyword mfInternal tracingcommands tracingrestores tracingmacros | |
25 syn keyword mfInternal tracingedges tracingoutput tracingonline tracingstats | |
26 syn keyword mfInternal pausing showstopping fontmaking proofing | |
27 syn keyword mfInternal turningcheck warningcheck smoothing autorounding | |
28 syn keyword mfInternal granularity fillin year month day time | |
29 syn keyword mfInternal charcode charext charwd charht chardp charic | |
30 syn keyword mfInternal chardx chardy designsize hppp vppp xoffset yoffset | |
31 syn keyword mfInternal boundarychar | |
32 | |
33 " Page 212: 'pair expressions' | |
34 syn keyword mfPairExp point of precontrol postcontrol penoffset rotated | |
35 syn keyword mfPairExp scaled shifted slanted transformed xscaled yscaled | |
36 syn keyword mfPairExp zscaled | |
37 | |
38 " Page 213: 'path expressions' | |
39 syn keyword mfPathExp makepath reverse subpath curl tension atleast | |
40 syn keyword mfPathExp controls cycle | |
41 | |
42 " Page 214: 'pen expressions' | |
43 syn keyword mfPenExp nullpen pencircle makepen | |
44 | |
45 " Page 214: 'picutre expressions' | |
46 syn keyword mfPicExp nullpicture | |
47 | |
48 " Page 214: 'string expressions' | |
49 syn keyword mfStringExp jobname readstring str char decimal substring | |
50 | |
51 " Page 217: 'commands and statements' | |
52 syn keyword mfCommand end dump save interim newinternal randomseed let | |
53 syn keyword mfCommand delimiters outer everyjob show showvariable showtoken | |
54 syn keyword mfCommand showdependencies showstats message errmessage errhelp | |
55 syn keyword mfCommand batchmode nonstopmode scrollmode errorstopmode | |
56 syn keyword mfCommand addto also contour doublepath withpen withweight cull | |
57 syn keyword mfCommand keeping dropping display inwindow openwindow at from to | |
58 syn keyword mfCommand shipout special numspecial | |
59 | |
60 " Page 56: 'types' | |
61 syn keyword mfType boolean numeric pair path pen picture string transform | |
62 | |
63 " Page 155: 'grouping' | |
64 syn keyword mfStatement begingroup endgroup | |
65 | |
66 " Page 165: 'definitions' | |
67 syn keyword mfDefinition enddef def expr suffix text primary secondary | |
68 syn keyword mfDefinition tertiary vardef primarydef secondarydef tertiarydef | |
69 | |
70 " Page 169: 'conditions and loops' | |
71 syn keyword mfCondition if fi else elseif endfor for forsuffixes forever | |
72 syn keyword mfCondition step until exitif | |
73 | |
74 " Other primitives listed in the index | |
75 syn keyword mfPrimitive charlist endinput expandafter extensible | |
76 syn keyword mfPrimitive fontdimen headerbyte inner input intersectiontimes | |
77 syn keyword mfPrimitive kern ligtable quote scantokens skipto | |
78 | |
79 " Keywords defined by plain.mf (defined on pp.262-278) | |
80 if !exists("plain_mf_macros") | |
81 let plain_mf_macros = 1 " Set this to '0' if your source gets too colourful | |
82 " metapost.vim does so to turn off Metafont macros | |
83 endif | |
84 if plain_mf_macros | |
85 syn keyword mfMacro abs addto_currentpicture aspect_ratio base_name | |
86 syn keyword mfMacro base_version beginchar blacker blankpicture bot bye byte | |
87 syn keyword mfMacro capsule_def ceiling change_width clear_pen_memory clearit | |
88 syn keyword mfMacro clearpen clearxy counterclockwise culldraw cullit | |
89 syn keyword mfMacro currentpen currentpen_path currentpicture | |
90 syn keyword mfMacro currenttransform currentwindow cutdraw cutoff d decr | |
91 syn keyword mfMacro define_blacker_pixels define_corrected_pixels | |
92 syn keyword mfMacro define_good_x_pixels define_good_y_pixels | |
93 syn keyword mfMacro define_horizontal_corrected_pixels define_pixels | |
94 syn keyword mfMacro define_whole_blacker_pixels define_whole_pixels | |
95 syn keyword mfMacro define_whole_vertical_blacker_pixels | |
96 syn keyword mfMacro define_whole_vertical_pixels dir direction directionpoint | |
97 syn keyword mfMacro displaying ditto div dotprod down downto draw drawdot | |
98 syn keyword mfMacro endchar eps epsilon extra_beginchar extra_endchar | |
99 syn keyword mfMacro extra_setup erase exitunless fill filldraw fix_units flex | |
100 syn keyword mfMacro font_coding_scheme font_extra_space font_identifier | |
101 syn keyword mfMacro font_normal_shrink font_normal_space font_normal_stretch | |
102 syn keyword mfMacro font_quad font_setup font_size font_slant font_x_height | |
103 syn keyword mfMacro fullcircle generate gfcorners gobble gobbled grayfont h | |
104 syn keyword mfMacro halfcircle hide hround identity image_rules incr infinity | |
105 syn keyword mfMacro interact interpath intersectionpoint inverse italcorr | |
106 syn keyword mfMacro join_radius killtext labelfont labels left lft localfont | |
107 syn keyword mfMacro loggingall lowres lowres_fix mag magstep makebox makegrid | |
108 syn keyword mfMacro makelabel maketicks max min mod mode mode_def mode_name | |
109 syn keyword mfMacro mode_setup nodisplays notransforms number_of_modes numtok | |
110 syn keyword mfMacro o_correction openit origin pen_bot pen_lft pen_rt pen_top | |
111 syn keyword mfMacro penlabels penpos penrazor penspeck pensquare penstroke | |
112 syn keyword mfMacro pickup pixels_per_inch proof proofoffset proofrule | |
113 syn keyword mfMacro proofrulethickness quartercircle range reflectedabout | |
114 syn keyword mfMacro relax right rotatedabout rotatedaround round rt rulepen | |
115 syn keyword mfMacro savepen screenchars screen_rows screen_cols screenrule | |
116 syn keyword mfMacro screenstrokes shipit showit slantfont smode smoke softjoin | |
117 syn keyword mfMacro solve stop superellipse takepower tensepath titlefont | |
118 syn keyword mfMacro tolerance top tracingall tracingnone undraw undrawdot | |
119 syn keyword mfMacro unfill unfilldraw unitpixel unitsquare unitvector up upto | |
120 syn keyword mfMacro vround w whatever | |
121 endif | |
122 | |
123 " Some other basic macro names, e.g., from cmbase, logo, etc. | |
124 if !exists("other_mf_macros") | |
125 let other_mf_macros = 1 " Set this to '0' if your code gets too colourful | |
126 " metapost.vim does so to turn off Metafont macros | |
127 endif | |
128 if other_mf_macros | |
129 syn keyword mfMacro beginlogochar | |
130 endif | |
131 | |
132 " Numeric tokens | |
133 syn match mfNumeric "[-]\=\d\+" | |
134 syn match mfNumeric "[-]\=\.\d\+" | |
135 syn match mfNumeric "[-]\=\d\+\.\d\+" | |
136 | |
137 " Metafont lengths | |
138 syn match mfLength "\<\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\>" | |
139 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\)\#\=\>" | |
141 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 | |
147 " String constants | |
148 syn region mfString start=+"+ end=+"+ | |
149 | |
150 " Comments: | |
151 syn match mfComment "%.*$" | |
152 | |
153 " synchronizing | |
154 syn sync maxlines=50 | |
155 | |
156 " Define the default highlighting | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
157 " Only when an item doesn't have highlighting yet |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
158 command -nargs=+ HiLink hi def link <args> |
7 | 159 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
160 HiLink mfBoolExp Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
161 HiLink mfNumExp Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
162 HiLink mfInternal Identifier |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
163 HiLink mfPairExp Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
164 HiLink mfPathExp Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
165 HiLink mfPenExp Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
166 HiLink mfPicExp Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
167 HiLink mfStringExp Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
168 HiLink mfCommand Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
169 HiLink mfType Type |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
170 HiLink mfStatement Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
171 HiLink mfDefinition Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
172 HiLink mfCondition Conditional |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
173 HiLink mfPrimitive Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
174 HiLink mfMacro Macro |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
175 HiLink mfCoord Identifier |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
176 HiLink mfPoint Identifier |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
177 HiLink mfNumeric Number |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
178 HiLink mfLength Number |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
179 HiLink mfComment Comment |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
180 HiLink mfString String |
7 | 181 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
182 delcommand HiLink |
7 | 183 |
184 let b:current_syntax = "mf" | |
185 | |
186 " vim: ts=8 |