Mercurial > vim
annotate runtime/syntax/mp.vim @ 10051:46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 31 22:22:10 2016 +0200
Updated runtime files. Remove HiLink commands.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 31 Aug 2016 22:30:08 +0200 |
parents | 43efa4f5a8ea |
children | 876fbdd84e52 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: MetaPost | |
3 " Maintainer: Andreas Scherer <andreas.scherer@pobox.com> | |
4 " Last Change: April 30, 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 let plain_mf_macros = 0 " plain.mf has no special meaning for MetaPost | |
12 let other_mf_macros = 0 " cmbase.mf, logo.mf, ... neither | |
13 | |
14 " Read the Metafont syntax to start with | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
15 runtime! syntax/mf.vim |
7 | 16 |
17 " MetaPost has TeX inserts for typeset labels | |
18 " verbatimtex, btex, and etex will be treated as keywords | |
19 syn match mpTeXbegin "\(verbatimtex\|btex\)" | |
20 syn match mpTeXend "etex" | |
21 syn region mpTeXinsert start="\(verbatimtex\|btex\)"hs=e+1 end="etex"he=s-1 contains=mpTeXbegin,mpTeXend keepend | |
22 | |
23 " MetaPost primitives not found in Metafont | |
24 syn keyword mpInternal bluepart clip color dashed fontsize greenpart infont | |
25 syn keyword mpInternal linecap linejoin llcorner lrcorner miterlimit mpxbreak | |
26 syn keyword mpInternal prologues redpart setbounds tracinglostchars | |
27 syn keyword mpInternal truecorners ulcorner urcorner withcolor | |
28 | |
29 " Metafont primitives not found in MetaPost | |
30 syn keyword notDefined autorounding chardx chardy fillin granularity hppp | |
31 syn keyword notDefined proofing smoothing tracingedges tracingpens | |
32 syn keyword notDefined turningcheck vppp xoffset yoffset | |
33 | |
34 " Keywords defined by plain.mp | |
35 if !exists("plain_mp_macros") | |
36 let plain_mp_macros = 1 " Set this to '0' if your source gets too colourful | |
37 endif | |
38 if plain_mp_macros | |
39 syn keyword mpMacro ahangle ahlength background bbox bboxmargin beginfig | |
40 syn keyword mpMacro beveled black blue buildcycle butt center cutafter | |
41 syn keyword mpMacro cutbefore cuttings dashpattern defaultfont defaultpen | |
42 syn keyword mpMacro defaultscale dotlabel dotlabels drawarrow drawdblarrow | |
43 syn keyword mpMacro drawoptions endfig evenly extra_beginfig extra_endfig | |
44 syn keyword mpMacro green label labeloffset mitered red rounded squared | |
45 syn keyword mpMacro thelabel white base_name base_version | |
46 syn keyword mpMacro upto downto exitunless relax gobble gobbled | |
47 syn keyword mpMacro interact loggingall tracingall tracingnone | |
48 syn keyword mpMacro eps epsilon infinity right left up down origin | |
49 syn keyword mpMacro quartercircle halfcircle fullcircle unitsquare identity | |
50 syn keyword mpMacro blankpicture withdots ditto EOF pensquare penrazor | |
51 syn keyword mpMacro penspeck whatever abs round ceiling byte dir unitvector | |
52 syn keyword mpMacro inverse counterclockwise tensepath mod div dotprod | |
53 syn keyword mpMacro takepower direction directionpoint intersectionpoint | |
54 syn keyword mpMacro softjoin incr decr reflectedabout rotatedaround | |
55 syn keyword mpMacro rotatedabout min max flex superellipse interpath | |
56 syn keyword mpMacro magstep currentpen currentpen_path currentpicture | |
57 syn keyword mpMacro fill draw filldraw drawdot unfill undraw unfilldraw | |
58 syn keyword mpMacro undrawdot erase cutdraw image pickup numeric_pickup | |
59 syn keyword mpMacro pen_lft pen_rt pen_top pen_bot savepen clearpen | |
60 syn keyword mpMacro clear_pen_memory lft rt top bot ulft urt llft lrt | |
61 syn keyword mpMacro penpos penstroke arrowhead makelabel labels penlabel | |
62 syn keyword mpMacro range numtok thru clearxy clearit clearpen pickup | |
63 syn keyword mpMacro shipit bye hide stop solve | |
64 endif | |
65 | |
66 " Keywords defined by mfplain.mp | |
67 if !exists("mfplain_mp_macros") | |
68 let mfplain_mp_macros = 0 " Set this to '1' to include these macro names | |
69 endif | |
70 if mfplain_mp_macros | |
71 syn keyword mpMacro beginchar blacker capsule_def change_width | |
72 syn keyword mpMacro define_blacker_pixels define_corrected_pixels | |
73 syn keyword mpMacro define_good_x_pixels define_good_y_pixels | |
74 syn keyword mpMacro define_horizontal_corrected_pixels | |
75 syn keyword mpMacro define_pixels define_whole_blacker_pixels | |
76 syn keyword mpMacro define_whole_vertical_blacker_pixels | |
77 syn keyword mpMacro define_whole_vertical_pixels endchar | |
78 syn keyword mpMacro extra_beginchar extra_endchar extra_setup | |
79 syn keyword mpMacro font_coding_scheme font_extra_space font_identifier | |
80 syn keyword mpMacro font_normal_shrink font_normal_space | |
81 syn keyword mpMacro font_normal_stretch font_quad font_size | |
82 syn keyword mpMacro font_slant font_x_height italcorr labelfont | |
83 syn keyword mpMacro makebox makegrid maketicks mode_def mode_setup | |
84 syn keyword mpMacro o_correction proofrule proofrulethickness rulepen smode | |
85 | |
86 " plus some no-ops, also from mfplain.mp | |
87 syn keyword mpMacro cullit currenttransform gfcorners grayfont hround | |
88 syn keyword mpMacro imagerules lowres_fix nodisplays notransforms openit | |
89 syn keyword mpMacro proofoffset screenchars screenrule screenstrokes | |
90 syn keyword mpMacro showit slantfont titlefont unitpixel vround | |
91 endif | |
92 | |
93 " Keywords defined by other macro packages, e.g., boxes.mp | |
94 if !exists("other_mp_macros") | |
95 let other_mp_macros = 1 " Set this to '0' if your source gets too colourful | |
96 endif | |
97 if other_mp_macros | |
98 syn keyword mpMacro circmargin defaultdx defaultdy | |
99 syn keyword mpMacro boxit boxjoin bpath circleit drawboxed drawboxes | |
100 syn keyword mpMacro drawunboxed fixpos fixsize pic | |
101 endif | |
102 | |
103 " Define the default highlighting | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
104 " Only when an item doesn't have highlighting yet |
7 | 105 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
106 hi def link mpTeXinsert String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
107 hi def link mpTeXbegin Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
108 hi def link mpTeXend Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
109 hi def link mpInternal mfInternal |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
110 hi def link mpMacro Macro |
7 | 111 |
112 | |
113 let b:current_syntax = "mp" | |
114 | |
115 " vim: ts=8 |