7
|
1 " Vim syntax file
|
|
2 " Language: GRUB Configuration File
|
|
3 " Maintainer: Nikolai Weibull <source@pcppopper.org>
|
|
4 " URL: http://www.pcppopper.org/vim/syntax/pcp/grub/
|
|
5 " Latest Revision: 2004-05-06
|
|
6 " arch-tag: 7a56ddd0-e551-44bc-b8c0-235fedbdf3c0
|
|
7
|
|
8 if version < 600
|
|
9 syntax clear
|
|
10 elseif exists("b:current_syntax")
|
|
11 finish
|
|
12 endif
|
|
13
|
|
14 " comments
|
|
15 syn region grubComment display oneline start="^#" end="$" contains=grubTodo
|
|
16
|
|
17 " todo
|
|
18 syn keyword grubTodo contained TODO FIXME XXX NOTE
|
|
19
|
|
20 " devices
|
|
21 syn match grubDevice display "(\([fh]d\d\|\d\+\|0x\x\+\)\(,\d\+\)\=\(,\l\)\=)"
|
|
22
|
|
23 " block lists
|
|
24 syn match grubBlock display "\(\d\+\)\=+\d\+\(,\(\d\+\)\=+\d\+\)*"
|
|
25
|
|
26 " numbers
|
|
27 syn match grubNumbers display "+\=\<\d\+\|0x\x\+\>"
|
|
28
|
|
29 syn match grubBegin display "^" nextgroup=grubCommand,grubComment skipwhite
|
|
30
|
|
31 " menu commands
|
|
32 syn keyword grubCommand contained default fallback hiddenmenu timeout title
|
|
33
|
|
34 " general commands
|
|
35 syn keyword grubCommand contained bootp color device dhcp hide ifconfig pager
|
|
36 syn keyword grubCommand contained partnew parttype password rarp serial setkey
|
|
37 syn keyword grubCommand contained terminal tftpserver unhide blocklist boot cat
|
|
38 syn keyword grubCommand contained chainloader cmp configfile debug displayapm
|
|
39 syn keyword grubCommand contained displaymem embed find fstest geometry halt help
|
|
40 syn keyword grubCommand contained impsprobe initrd install ioprobe kernel lock
|
|
41 syn keyword grubCommand contained makeactive map md5crypt module modulenounzip pause
|
|
42 syn keyword grubCommand contained quit reboot read root rootnoverify savedefault
|
|
43 syn keyword grubCommand contained setup testload testvbe uppermem vbeprobe
|
|
44
|
|
45 " colors
|
|
46 syn match grubColor "\(blink-\)\=\(black\|blue\|green\|cyan\|red\|magenta\|brown\|yellow\|white\)"
|
|
47 syn match grubColor "\<\(blink-\)\=light-\(gray\|blue\|green\|cyan\|red\|magenta\)"
|
|
48 syn match grubColor "\<\(blink-\)\=dark-gray"
|
|
49
|
|
50 " specials
|
|
51 syn keyword grubSpecial saved
|
|
52
|
|
53 " Define the default highlighting.
|
|
54 " For version 5.7 and earlier: only when not done already
|
|
55 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
56 if version >= 508 || !exists("did_grub_syn_inits")
|
|
57 if version < 508
|
|
58 let did_grub_syn_inits = 1
|
|
59 command -nargs=+ HiLink hi link <args>
|
|
60 else
|
|
61 command -nargs=+ HiLink hi def link <args>
|
|
62 endif
|
|
63
|
|
64 HiLink grubComment Comment
|
|
65 HiLink grubTodo Todo
|
|
66 HiLink grubNumbers Number
|
|
67 HiLink grubDevice Identifier
|
|
68 HiLink grubBlock Identifier
|
|
69 HiLink grubCommand Keyword
|
|
70 HiLink grubColor Identifier
|
|
71 HiLink grubSpecial Special
|
|
72 delcommand HiLink
|
|
73 endif
|
|
74
|
|
75 let b:current_syntax = "grub"
|
|
76
|
|
77 " vim: set sts=2 sw=2:
|