annotate runtime/syntax/mp.vim @ 30154:9137d2bc93bf v9.0.0413

patch 9.0.0413: ASAN reports a memory leak Commit: https://github.com/vim/vim/commit/b0d12e63e8c763ce940dc4c162111fedde2507ef Author: K.Takata <kentkt@csc.jp> Date: Thu Sep 8 10:55:38 2022 +0100 patch 9.0.0413: ASAN reports a memory leak Problem: ASAN reports a memory leak. Solution: Free the string received from the server. (Ken Takata, closes #11080)
author Bram Moolenaar <Bram@vim.org>
date Thu, 08 Sep 2022 12:00:05 +0200
parents 2acb87ee55fc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
1 vim9script
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
2
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
3 # Vim syntax file
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
4 # Language: MetaPost
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
5 # Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
6 # Former Maintainers: Andreas Scherer <andreas.scherer@pobox.com>
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
7 # Latest Revision: 2022 Aug 12
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
9 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
13 # Deprecation warnings: to be removed eventually
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
14 if exists("g:plain_mp_macros")
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
15 echomsg "[mp] g:plain_mp_macros is deprecated: use g:mp_plain_macros instead."
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
16 endif
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
17 if exists("mfplain_mp_macros")
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
18 echomsg "[mp] g:mfplain_mp_macros is deprecated: use g:mp_mfplain_macros instead."
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
19 endif
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
20 if exists("other_mp_macros")
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
21 echomsg "[mp] g:other_mp_macros is deprecated: use g:mp_other_macros instead."
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
22 endif
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
23
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
24 # Store the current values of METAFONT global options
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
25 const mf_plain_macros = get(g:, "mf_plain_macros", get(g:, "plain_mf_macros", -1))
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
26 const mf_plain_modes = get(g:, "mf_plain_modes", get(g:, "plain_mf_modes", -1))
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
27 const mf_other_macros = get(g:, "mf_other_macros", get(g:, "other_mf_macros", -1))
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
29 g:mf_plain_macros = 0 # plain.mf has no special meaning for MetaPost
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
30 g:mf_plain_modes = 0 # No METAFONT modes
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
31 g:mf_other_macros = 0 # cmbase.mf, logo.mf, ... neither
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
32
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
33 # 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
34 runtime! syntax/mf.vim
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
35 unlet b:current_syntax # Necessary for syn include below
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
36
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
37 # Restore the value of existing global variables
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
38 if mf_plain_macros == -1
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
39 unlet g:mf_plain_macros
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
40 else
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
41 g:plain_mf_macros = mf_plain_macros
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
42 endif
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
43 if mf_plain_modes == -1
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
44 unlet g:mf_plain_modes
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
45 else
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
46 g:mf_plain_modes = mf_plain_modes
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
47 endif
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
48 if mf_other_macros == -1
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
49 unlet g:mf_other_macros
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
50 else
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
51 g:mf_other_macros = mf_other_macros
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
52 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
54 # Use TeX highlighting inside verbatimtex/btex... etex
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
55 syn include @MPTeX syntax/tex.vim
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
56 unlet b:current_syntax
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
57 # These are defined as keywords rather than using matchgroup
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
58 # in order to make them available to syntaxcomplete.
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
59 syn keyword mpTeXdelim btex etex verbatimtex contained
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
60 syn region mpTeXinsert matchgroup=mpTeXdelim start=/\<verbatimtex\>\|\<btex\>/ end=/\<etex\>/ keepend contains=@MPTeX,mpTeXdelim
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
61
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
62 # iskeyword must be set after the syn include above, because tex.vim sets `syn
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
63 # iskeyword`. Note that keywords do not contain numbers (numbers are
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
64 # subscripts)
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
65 syntax iskeyword @,_
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
67 # MetaPost primitives not found in METAFONT
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
68 syn keyword mpBoolExp bounded clipped filled stroked textual arclength
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
69 syn keyword mpNumExp arctime blackpart bluepart colormodel cyanpart
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
70 syn keyword mpNumExp fontsize greenpart greypart magentapart redpart
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
71 syn keyword mpPairExp yellowpart llcorner lrcorner ulcorner urcorner
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
72 syn keyword mpPathExp envelope pathpart
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
73 syn keyword mpPenExp penpart
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
74 syn keyword mpPicExp dashpart glyph infont
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
75 syn keyword mpStringExp fontpart readfrom textpart
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
76 syn keyword mpType cmykcolor color rgbcolor
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
77 # Other MetaPost primitives listed in the manual
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
78 syn keyword mpPrimitive mpxbreak within
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
79 # Internal quantities not found in METAFONT
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
80 # (Table 6 in MetaPost: A User's Manual)
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
81 syn keyword mpInternal defaultcolormodel hour minute linecap linejoin
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
82 syn keyword mpInternal miterlimit mpprocset mpversion numberprecision
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
83 syn keyword mpInternal numbersystem outputfilename outputformat
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
84 syn keyword mpInternal outputformatoptions outputtemplate prologues
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
85 syn keyword mpInternal restoreclipcolor tracinglostchars troffmode
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
86 syn keyword mpInternal truecorners
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
87 # List of commands not found in METAFONT (from MetaPost: A User's Manual)
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
88 syn keyword mpCommand clip closefrom dashed filenametemplate fontmapfile
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
89 syn keyword mpCommand fontmapline setbounds withcmykcolor withcolor
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
90 syn keyword mpCommand withgreyscale withoutcolor withpostscript
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
91 syn keyword mpCommand withprescript withrgbcolor write
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
92 # METAFONT internal variables not found in MetaPost
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
93 syn keyword notDefined autorounding chardx chardy fillin granularity
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
94 syn keyword notDefined proofing smoothing tracingedges tracingpens
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
95 syn keyword notDefined turningcheck xoffset yoffset
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
96 # Suffix defined only in METAFONT:
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
97 syn keyword notDefined nodot
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
98 # Other not implemented primitives (see MetaPost: A User's Manual, §C.1)
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
99 syn keyword notDefined cull display openwindow numspecial totalweight
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
100 syn keyword notDefined withweight
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
102 # Keywords defined by plain.mp
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
103 if get(g:, "mp_plain_macros", get(g:, "plain_mp_macros", 1)) || get(b:, "mp_metafun", get(g:, "mp_metafun", 0))
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
104 syn keyword mpDef beginfig clear_pen_memory clearit clearpen clearpen
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
105 syn keyword mpDef clearxy colorpart cutdraw downto draw drawarrow
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
106 syn keyword mpDef drawdblarrow drawdot drawoptions endfig erase
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
107 syn keyword mpDef exitunless fill filldraw flex gobble hide interact
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
108 syn keyword mpDef label loggingall makelabel numtok penstroke pickup
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
109 syn keyword mpDef range reflectedabout rotatedaround shipit
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
110 syn keyword mpDef stop superellipse takepower tracingall tracingnone
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
111 syn keyword mpDef undraw undrawdot unfill unfilldraw upto
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
112 syn match mpDef "???"
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
113 syn keyword mpVardef arrowhead bbox bot buildcycle byte ceiling center
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
114 syn keyword mpVardef counterclockwise decr dir direction directionpoint
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
115 syn keyword mpVardef dotlabel dotlabels image incr interpath inverse
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
116 syn keyword mpVardef labels lft magstep max min penlabels penpos round
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
117 syn keyword mpVardef rt savepen solve tensepath thelabel top unitvector
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
118 syn keyword mpVardef whatever z
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
119 syn keyword mpPrimaryDef div dotprod gobbled mod
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
120 syn keyword mpSecondaryDef intersectionpoint
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
121 syn keyword mpTertiaryDef cutafter cutbefore softjoin thru
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
122 syn keyword mpNewInternal ahangle ahlength bboxmargin beveled butt defaultpen
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
123 syn keyword mpNewInternal defaultscale dotlabeldiam eps epsilon infinity
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
124 syn keyword mpNewInternal join_radius labeloffset mitered pen_bot pen_lft
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
125 syn keyword mpNewInternal pen_rt pen_top rounded squared tolerance
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
126 # Predefined constants
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
127 syn keyword mpConstant EOF background base_name base_version black
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
128 syn keyword mpConstant blankpicture blue ditto down evenly fullcircle
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
129 syn keyword mpConstant green halfcircle identity left origin penrazor
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
130 syn keyword mpConstant penspeck pensquare quartercircle red right
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
131 syn keyword mpConstant unitsquare up white withdots
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
132 # Other predefined variables
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
133 syn keyword mpVariable currentpen currentpen_path currentpicture cuttings
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
134 syn keyword mpVariable defaultfont extra_beginfig extra_endfig
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
135 syn keyword mpVariable laboff labxf labyf laboff labxf labyf
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
136 syn match mpVariable /\.\%(lft\|rt\|bot\|top\|ulft\|urt\|llft\|lrt\)\>/
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
137 # let statements:
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
138 syn keyword mpnumExp abs
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
139 syn keyword mpDef rotatedabout
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
140 syn keyword mpCommand bye relax
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
141 # on and off are not technically keywords, but it is nice to highlight them
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
142 # inside dashpattern().
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
143 syn keyword mpOnOff off on contained
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
144 syn keyword mpDash dashpattern contained
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
145 syn region mpDashPattern start="dashpattern\s*" end=")"he=e-1 contains=mfNumeric,mfLength,mpOnOff,mpDash
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
148 # Keywords defined by mfplain.mp
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
149 if get(g:, "mp_mfplain_macros", get(g:, "mfplain_mp_macros", 0))
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
150 syn keyword mpDef beginchar capsule_def change_width
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
151 syn keyword mpDef define_blacker_pixels define_corrected_pixels
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
152 syn keyword mpDef define_good_x_pixels define_good_y_pixels
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
153 syn keyword mpDef define_horizontal_corrected_pixels define_pixels
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
154 syn keyword mpDef define_whole_blacker_pixels define_whole_pixels
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
155 syn keyword mpDef define_whole_vertical_blacker_pixels
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
156 syn keyword mpDef define_whole_vertical_pixels endchar
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
157 syn keyword mpDef font_coding_scheme font_extra_space font_identifier
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
158 syn keyword mpDef font_normal_shrink font_normal_space
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
159 syn keyword mpDef font_normal_stretch font_quad font_size font_slant
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
160 syn keyword mpDef font_x_height italcorr labelfont lowres_fix makebox
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
161 syn keyword mpDef makegrid maketicks mode_def mode_setup proofrule
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
162 syn keyword mpDef smode
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
163 syn keyword mpVardef hround proofrulethickness vround
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
164 syn keyword mpNewInternal blacker o_correction
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
165 syn keyword mpVariable extra_beginchar extra_endchar extra_setup rulepen
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
166 # plus some no-ops, also from mfplain.mp
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
167 syn keyword mpDef cull cullit gfcorners imagerules nodisplays
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
168 syn keyword mpDef notransforms openit proofoffset screenchars
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
169 syn keyword mpDef screenrule screenstrokes showit
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
170 syn keyword mpVardef grayfont slantfont titlefont
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
171 syn keyword mpVariable currenttransform
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
172 syn keyword mpConstant unitpixel
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
173 # These are not listed in the MetaPost manual, and some are ignored by
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
174 # MetaPost, but are nonetheless defined in mfplain.mp
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
175 syn keyword mpDef killtext
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
176 syn match mpVardef "\<good\.\%(x\|y\|lft\|rt\|top\|bot\)\>"
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
177 syn keyword mpVariable aspect_ratio localfont mag mode mode_name
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
178 syn keyword mpVariable proofcolor
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
179 syn keyword mpConstant lowres proof smoke
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
180 syn keyword mpNewInternal autorounding bp_per_pixel granularity
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
181 syn keyword mpNewInternal number_of_modes proofing smoothing turningcheck
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
184 # Keywords defined by all base macro packages:
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
185 # - (r)boxes.mp
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
186 # - format.mp
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
187 # - graph.mp
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
188 # - marith.mp
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
189 # - sarith.mp
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
190 # - string.mp
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
191 # - TEX.mp
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
192 if get(g:, "mp_other_macros", get(g:, "other_mp_macros", 1))
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
193 # boxes and rboxes
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
194 syn keyword mpDef boxjoin drawboxed drawboxes drawunboxed
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
195 syn keyword mpNewInternal circmargin defaultdx defaultdy rbox_radius
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
196 syn keyword mpVardef boxit bpath circleit fixpos fixsize generic_declare
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
197 syn keyword mpVardef generic_redeclare generisize pic rboxit str_prefix
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
198 # format
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
199 syn keyword mpVardef Mformat format init_numbers roundd
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
200 syn keyword mpVariable Fe_base Fe_plus
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
201 syn keyword mpConstant Ten_to
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
202 # graph
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
203 syn keyword mpDef Gfor Gxyscale OUT auto begingraph endgraph gdata
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
204 syn keyword mpDef gdraw gdrawarrow gdrawdblarrow gfill plot
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
205 syn keyword mpVardef augment autogrid frame gdotlabel glabel grid itick
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
206 syn keyword mpVardef otick
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
207 syn keyword mpVardef Mreadpath setcoords setrange
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
208 syn keyword mpNewInternal Gmarks Gminlog Gpaths linear log
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
209 syn keyword mpVariable Autoform Gemarks Glmarks Gumarks
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
210 syn keyword mpConstant Gtemplate
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
211 syn match mpVariable /Gmargin\.\%(low\|high\)/
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
212 # marith
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
213 syn keyword mpVardef Mabs Meform Mexp Mexp_str Mlog Mlog_Str Mlog_str
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
214 syn keyword mpPrimaryDef Mdiv Mmul
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
215 syn keyword mpSecondaryDef Madd Msub
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
216 syn keyword mpTertiaryDef Mleq
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
217 syn keyword mpNewInternal Mten Mzero
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
218 # sarith
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
219 syn keyword mpVardef Sabs Scvnum
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
220 syn keyword mpPrimaryDef Sdiv Smul
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
221 syn keyword mpSecondaryDef Sadd Ssub
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
222 syn keyword mpTertiaryDef Sleq Sneq
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
223 # string
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
224 syn keyword mpVardef cspan isdigit loptok
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
225 # TEX
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
226 syn keyword mpVardef TEX TEXPOST TEXPRE
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
229 if get(b:, "mp_metafun", get(g:, "mp_metafun", 0))
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
230 # MetaFun additions to MetaPost base file
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
231 syn keyword mpConstant cyan magenta yellow
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
232 syn keyword mpConstant penspec
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
233 syn keyword mpNumExp graypart greycolor graycolor
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
234
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
235 # Highlight TeX keywords (for MetaPost embedded in ConTeXt documents)
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 10244
diff changeset
236 syn match mpTeXKeyword '\\[a-zA-Z@]\+'
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 10244
diff changeset
237
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
238 syn keyword mpPrimitive runscript
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
239
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
240 runtime! syntax/shared/context-data-metafun.vim
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
241
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
242 hi def link metafunCommands Statement
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
243 hi def link metafunInternals Identifier
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
244 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
246 # Define the default highlighting
10244
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
247 hi def link mpTeXdelim mpPrimitive
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
248 hi def link mpBoolExp mfBoolExp
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
249 hi def link mpNumExp mfNumExp
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
250 hi def link mpPairExp mfPairExp
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
251 hi def link mpPathExp mfPathExp
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
252 hi def link mpPenExp mfPenExp
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
253 hi def link mpPicExp mfPicExp
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
254 hi def link mpStringExp mfStringExp
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
255 hi def link mpInternal mfInternal
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
256 hi def link mpCommand mfCommand
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
257 hi def link mpType mfType
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
258 hi def link mpPrimitive mfPrimitive
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
259 hi def link mpDef mfDef
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
260 hi def link mpVardef mpDef
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
261 hi def link mpPrimaryDef mpDef
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
262 hi def link mpSecondaryDef mpDef
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
263 hi def link mpTertiaryDef mpDef
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
264 hi def link mpNewInternal mpInternal
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
265 hi def link mpVariable mfVariable
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
266 hi def link mpConstant mfConstant
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
267 hi def link mpOnOff mpPrimitive
876fbdd84e52 commit https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
268 hi def link mpDash mpPrimitive
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 10244
diff changeset
269 hi def link mpTeXKeyword Identifier
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
270
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
271 b:current_syntax = "mp"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10301
diff changeset
273 # vim: sw=2 fdm=marker