blob: a5c6186c438e3045ebaa50f8121282c81010de1f [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" Language: mgp - MaGic Point
3" Maintainer: Gerfried Fuchs <alfie@ist.org>
4" Filenames: *.mgp
5" Last Change: 25 Apr 2001
6" URL: http://alfie.ist.org/vim/syntax/mgp.vim
7"
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!
11
12
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020013" quit when a syntax file was already loaded
14if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +000015 finish
16endif
17
18
19syn match mgpLineSkip "\\$"
20
21" all the commands that are currently recognized
22syn keyword mgpCommand contained size fore back bgrad left leftfill center
23syn keyword mgpCommand contained right shrink lcutin rcutin cont xfont vfont
24syn keyword mgpCommand contained tfont tmfont tfont0 bar image newimage
25syn keyword mgpCommand contained prefix icon bimage default tab vgap hgap
26syn keyword mgpCommand contained pause mark again system filter endfilter
27syn keyword mgpCommand contained vfcap tfdir deffont font embed endembed
28syn keyword mgpCommand contained noop pcache include
29
30" charset is not yet supported :-)
31" syn keyword mgpCommand contained charset
32
33syn region mgpFile contained start=+"+ skip=+\\\\\|\\"+ end=+"+
34syn match mgpValue contained "\d\+"
35syn match mgpSize contained "\d\+x\d\+"
36syn match mgpLine +^%.*$+ contains=mgpCommand,mgpFile,mgpSize,mgpValue
37
38" Comments
39syn match mgpPercent +^%%.*$+
40syn match mgpHash +^#.*$+
41
42" these only work alone
43syn match mgpPage +^%page$+
44syn match mgpNoDefault +^%nodefault$+
45
46
47" Define the default highlighting.
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020048" Only when an item doesn't have highlighting yet
49command -nargs=+ HiLink hi def link <args>
Bram Moolenaar071d4272004-06-13 20:20:40 +000050
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020051HiLink mgpLineSkip Special
Bram Moolenaar071d4272004-06-13 20:20:40 +000052
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020053HiLink mgpHash mgpComment
54HiLink mgpPercent mgpComment
55HiLink mgpComment Comment
Bram Moolenaar071d4272004-06-13 20:20:40 +000056
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020057HiLink mgpCommand Identifier
Bram Moolenaar071d4272004-06-13 20:20:40 +000058
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020059HiLink mgpLine Type
Bram Moolenaar071d4272004-06-13 20:20:40 +000060
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020061HiLink mgpFile String
62HiLink mgpSize Number
63HiLink mgpValue Number
Bram Moolenaar071d4272004-06-13 20:20:40 +000064
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020065HiLink mgpPage mgpDefine
66HiLink mgpNoDefault mgpDefine
67HiLink mgpDefine Define
Bram Moolenaar071d4272004-06-13 20:20:40 +000068
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020069delcommand HiLink
Bram Moolenaar071d4272004-06-13 20:20:40 +000070
71let b:current_syntax = "mgp"