2 " Language: mgp - MaGic Point
3 " Maintainer: Gerfried Fuchs <alfie@ist.org>
5 " Last Change: 25 Apr 2001
6 " URL: http://alfie.ist.org/vim/syntax/mgp.vim
8 " Comments are very welcome - but please make sure that you are commenting on
9 " the latest version of this file.
10 " SPAM is _NOT_ welcome - be ready to be reported!
13 " For version 5.x: Clear all syntax items
14 " For version 6.x: Quit when a syntax file was already loaded
17 elseif exists("b:current_syntax")
22 syn match mgpLineSkip "\\$"
24 " all the commands that are currently recognized
25 syn keyword mgpCommand contained size fore back bgrad left leftfill center
26 syn keyword mgpCommand contained right shrink lcutin rcutin cont xfont vfont
27 syn keyword mgpCommand contained tfont tmfont tfont0 bar image newimage
28 syn keyword mgpCommand contained prefix icon bimage default tab vgap hgap
29 syn keyword mgpCommand contained pause mark again system filter endfilter
30 syn keyword mgpCommand contained vfcap tfdir deffont font embed endembed
31 syn keyword mgpCommand contained noop pcache include
33 " charset is not yet supported :-)
34 " syn keyword mgpCommand contained charset
36 syn region mgpFile contained start=+"+ skip=+\\\\\|\\"+ end=+"+
37 syn match mgpValue contained "\d\+"
38 syn match mgpSize contained "\d\+x\d\+"
39 syn match mgpLine +^%.*$+ contains=mgpCommand,mgpFile,mgpSize,mgpValue
42 syn match mgpPercent +^%%.*$+
43 syn match mgpHash +^#.*$+
45 " these only work alone
46 syn match mgpPage +^%page$+
47 syn match mgpNoDefault +^%nodefault$+
50 " Define the default highlighting.
51 " For version 5.7 and earlier: only when not done already
52 " For version 5.8 and later: only when an item doesn't have highlighting yet
53 if version >= 508 || !exists("did_mgp_syn_inits")
54 let did_mgp_syn_inits = 1
56 let did_mgp_syn_inits = 1
57 command -nargs=+ HiLink hi link <args>
59 command -nargs=+ HiLink hi def link <args>
62 HiLink mgpLineSkip Special
64 HiLink mgpHash mgpComment
65 HiLink mgpPercent mgpComment
66 HiLink mgpComment Comment
68 HiLink mgpCommand Identifier
74 HiLink mgpValue Number
76 HiLink mgpPage mgpDefine
77 HiLink mgpNoDefault mgpDefine
78 HiLink mgpDefine Define
83 let b:current_syntax = "mgp"