home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unix / vim-6.2.tar.bz2 / vim-6.2.tar / vim62 / runtime / syntax / grub.vim < prev    next >
Encoding:
Text File  |  2002-10-24  |  2.7 KB  |  85 lines

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