1" Vim syntax file 2" Language: GRUB Configuration File 3" Maintainer: Nikolai Weibull <[email protected]> 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 8if version < 600 9 syntax clear 10elseif exists("b:current_syntax") 11 finish 12endif 13 14" comments 15syn region grubComment display oneline start="^#" end="$" contains=grubTodo 16 17" todo 18syn keyword grubTodo contained TODO FIXME XXX NOTE 19 20" devices 21syn match grubDevice display "(\([fh]d\d\|\d\+\|0x\x\+\)\(,\d\+\)\=\(,\l\)\=)" 22 23" block lists 24syn match grubBlock display "\(\d\+\)\=+\d\+\(,\(\d\+\)\=+\d\+\)*" 25 26" numbers 27syn match grubNumbers display "+\=\<\d\+\|0x\x\+\>" 28 29syn match grubBegin display "^" nextgroup=grubCommand,grubComment skipwhite 30 31" menu commands 32syn keyword grubCommand contained default fallback hiddenmenu timeout title 33 34" general commands 35syn keyword grubCommand contained bootp color device dhcp hide ifconfig pager 36syn keyword grubCommand contained partnew parttype password rarp serial setkey 37syn keyword grubCommand contained terminal tftpserver unhide blocklist boot cat 38syn keyword grubCommand contained chainloader cmp configfile debug displayapm 39syn keyword grubCommand contained displaymem embed find fstest geometry halt help 40syn keyword grubCommand contained impsprobe initrd install ioprobe kernel lock 41syn keyword grubCommand contained makeactive map md5crypt module modulenounzip pause 42syn keyword grubCommand contained quit reboot read root rootnoverify savedefault 43syn keyword grubCommand contained setup testload testvbe uppermem vbeprobe 44 45" colors 46syn match grubColor "\(blink-\)\=\(black\|blue\|green\|cyan\|red\|magenta\|brown\|yellow\|white\)" 47syn match grubColor "\<\(blink-\)\=light-\(gray\|blue\|green\|cyan\|red\|magenta\)" 48syn match grubColor "\<\(blink-\)\=dark-gray" 49 50" specials 51syn 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 56if 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 73endif 74 75let b:current_syntax = "grub" 76 77" vim: set sts=2 sw=2: 78