Install vim73
[msysgit.git] / share / vim / vim73 / syntax / lilo.vim
blob3e9459267b9bca8b21d59abdbb59423de4a8c719
1 " Vim syntax file
2 " Language: lilo configuration (lilo.conf)
3 " Maintainer: Niels Horn <niels.horn@gmail.com>
4 " Previous Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
5 " Last Change: 2010-02-03
7 " Setup
8 if version >= 600
9   if exists("b:current_syntax")
10     finish
11   endif
12 else
13   syntax clear
14 endif
16 if version >= 600
17   command -nargs=1 SetIsk setlocal iskeyword=<args>
18 else
19   command -nargs=1 SetIsk set iskeyword=<args>
20 endif
21 SetIsk @,48-57,.,-,_
22 delcommand SetIsk
24 syn case ignore
26 " Base constructs
27 syn match liloError "\S\+"
28 syn match liloComment "#.*$"
29 syn match liloEnviron "\$\w\+" contained
30 syn match liloEnviron "\${[^}]\+}" contained
31 syn match liloDecNumber "\d\+" contained
32 syn match liloHexNumber "0[xX]\x\+" contained
33 syn match liloDecNumberP "\d\+p\=" contained
34 syn match liloSpecial contained "\\\(\"\|\\\|$\)"
35 syn region liloString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=liloSpecial,liloEnviron
36 syn match liloLabel :[^ "]\+: contained contains=liloSpecial,liloEnviron
37 syn region liloPath start=+[$/]+ skip=+\\\\\|\\ \|\\$"+ end=+ \|$+ contained contains=liloSpecial,liloEnviron
38 syn match liloDecNumberList "\(\d\|,\)\+" contained contains=liloDecNumber
39 syn match liloDecNumberPList "\(\d\|[,p]\)\+" contained contains=liloDecNumberP,liloDecNumber
40 syn region liloAnything start=+[^[:space:]#]+ skip=+\\\\\|\\ \|\\$+ end=+ \|$+ contained contains=liloSpecial,liloEnviron,liloString
42 " Path
43 syn keyword liloOption backup bitmap boot disktab force-backup keytable map message nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
44 syn keyword liloKernelOpt initrd root nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
45 syn keyword liloImageOpt path loader table nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
46 syn keyword liloDiskOpt partition nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
48 " Other
49 syn keyword liloOption menu-scheme raid-extra-boot serial install nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
50 syn keyword liloOption bios-passes-dl nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
51 syn keyword liloOption default label alias wmdefault nextgroup=liloEqLabelString,liloEqLabelStringComment,liloError skipwhite skipempty
52 syn keyword liloKernelOpt ramdisk nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
53 syn keyword liloImageOpt password range nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
54 syn keyword liloDiskOpt set type nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
56 " Symbolic
57 syn keyword liloKernelOpt vga nextgroup=liloEqVga,liloEqVgaComment,liloError skipwhite skipempty
59 " Number
60 syn keyword liloOption delay timeout verbose nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty
61 syn keyword liloDiskOpt sectors heads cylinders start nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty
63 " String
64 syn keyword liloOption menu-title nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
65 syn keyword liloKernelOpt append addappend nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
66 syn keyword liloImageOpt fallback literal nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
68 " Hex number
69 syn keyword liloImageOpt map-drive to boot-as nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty
70 syn keyword liloDiskOpt bios normal hidden nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty
72 " Number list
73 syn keyword liloOption bmp-colors nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty
75 " Number list, some of the numbers followed by p
76 syn keyword liloOption bmp-table bmp-timer nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty
78 " Flag
79 syn keyword liloOption compact fix-table geometric ignore-table lba32 linear mandatory nowarn prompt
80 syn keyword liloOption bmp-retain el-torito-bootable-CD large-memory suppress-boot-time-BIOS-data
81 syn keyword liloKernelOpt read-only read-write
82 syn keyword liloImageOpt bypass lock mandatory optional restricted single-key unsafe
83 syn keyword liloImageOpt master-boot wmwarn wmdisable
84 syn keyword liloDiskOpt change activate deactivate inaccessible reset
86 " Image
87 syn keyword liloImage image other nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
88 syn keyword liloDisk disk nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
89 syn keyword liloChRules change-rules
91 " Vga keywords
92 syn keyword liloVgaKeyword ask ext extended normal contained
94 " Comment followed by equal sign and ...
95 syn match liloEqPathComment "#.*$" contained nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
96 syn match liloEqVgaComment "#.*$" contained nextgroup=liloEqVga,liloEqVgaComment,liloError skipwhite skipempty
97 syn match liloEqNumberComment "#.*$" contained nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty
98 syn match liloEqDecNumberComment "#.*$" contained nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty
99 syn match liloEqHexNumberComment "#.*$" contained nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty
100 syn match liloEqStringComment "#.*$" contained nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
101 syn match liloEqLabelStringComment "#.*$" contained nextgroup=liloEqLabelString,liloEqLabelStringComment,liloError skipwhite skipempty
102 syn match liloEqNumberListComment "#.*$" contained nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty
103 syn match liloEqDecNumberPListComment "#.*$" contained nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty
104 syn match liloEqAnythingComment "#.*$" contained nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
106 " Equal sign followed by ...
107 syn match liloEqPath "=" contained nextgroup=liloPath,liloPathComment,liloError skipwhite skipempty
108 syn match liloEqVga "=" contained nextgroup=liloVgaKeyword,liloHexNumber,liloDecNumber,liloVgaComment,liloError skipwhite skipempty
109 syn match liloEqNumber "=" contained nextgroup=liloDecNumber,liloHexNumber,liloNumberComment,liloError skipwhite skipempty
110 syn match liloEqDecNumber "=" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty
111 syn match liloEqHexNumber "=" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty
112 syn match liloEqString "=" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty
113 syn match liloEqLabelString "=" contained nextgroup=liloString,liloLabel,liloLabelStringComment,liloError skipwhite skipempty
114 syn match liloEqNumberList "=" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty
115 syn match liloEqDecNumberPList "=" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty
116 syn match liloEqAnything "=" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty
118 " Comment followed by ...
119 syn match liloPathComment "#.*$" contained nextgroup=liloPath,liloPathComment,liloError skipwhite skipempty
120 syn match liloVgaComment "#.*$" contained nextgroup=liloVgaKeyword,liloHexNumber,liloVgaComment,liloError skipwhite skipempty
121 syn match liloNumberComment "#.*$" contained nextgroup=liloDecNumber,liloHexNumber,liloNumberComment,liloError skipwhite skipempty
122 syn match liloDecNumberComment "#.*$" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty
123 syn match liloHexNumberComment "#.*$" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty
124 syn match liloStringComment "#.*$" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty
125 syn match liloLabelStringComment "#.*$" contained nextgroup=liloString,liloLabel,liloLabelStringComment,liloError skipwhite skipempty
126 syn match liloDecNumberListComment "#.*$" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty
127 syn match liloDecNumberPListComment "#.*$" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty
128 syn match liloAnythingComment "#.*$" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty
130 " Define the default highlighting
131 if version >= 508 || !exists("did_lilo_syntax_inits")
132   if version < 508
133     let did_lilo_syntax_inits = 1
134     command -nargs=+ HiLink hi link <args>
135   else
136     command -nargs=+ HiLink hi def link <args>
137   endif
139   HiLink liloEqPath             liloEquals
140   HiLink liloEqWord             liloEquals
141   HiLink liloEqVga              liloEquals
142   HiLink liloEqDecNumber        liloEquals
143   HiLink liloEqHexNumber        liloEquals
144   HiLink liloEqNumber           liloEquals
145   HiLink liloEqString           liloEquals
146   HiLink liloEqAnything         liloEquals
147   HiLink liloEquals             Special
149   HiLink liloError              Error
151   HiLink liloEqPathComment      liloComment
152   HiLink liloEqVgaComment       liloComment
153   HiLink liloEqDecNumberComment liloComment
154   HiLink liloEqHexNumberComment liloComment
155   HiLink liloEqStringComment    liloComment
156   HiLink liloEqAnythingComment  liloComment
157   HiLink liloPathComment        liloComment
158   HiLink liloVgaComment         liloComment
159   HiLink liloDecNumberComment   liloComment
160   HiLink liloHexNumberComment   liloComment
161   HiLink liloNumberComment      liloComment
162   HiLink liloStringComment      liloComment
163   HiLink liloAnythingComment    liloComment
164   HiLink liloComment            Comment
166   HiLink liloDiskOpt            liloOption
167   HiLink liloKernelOpt          liloOption
168   HiLink liloImageOpt           liloOption
169   HiLink liloOption             Keyword
171   HiLink liloDecNumber          liloNumber
172   HiLink liloHexNumber          liloNumber
173   HiLink liloDecNumberP         liloNumber
174   HiLink liloNumber             Number
175   HiLink liloString             String
176   HiLink liloPath               Constant
178   HiLink liloSpecial            Special
179   HiLink liloLabel              Title
180   HiLink liloDecNumberList      Special
181   HiLink liloDecNumberPList     Special
182   HiLink liloAnything           Normal
183   HiLink liloEnviron            Identifier
184   HiLink liloVgaKeyword         Identifier
185   HiLink liloImage              Type
186   HiLink liloChRules            Preproc
187   HiLink liloDisk               Preproc
189   delcommand HiLink
190 endif
192 let b:current_syntax = "lilo"