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 / modconf.vim < prev    next >
Encoding:
Text File  |  2002-10-25  |  2.4 KB  |  66 lines

  1. " Vim syntax file
  2. " Language:        Linux Modutils modules.conf File
  3. " Maintainer:        Nikolai :: lone-star :: Weibull <lone-star@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  modconfComment  start="#" skip="\\$" end="$" contains=modconfTodo
  15.  
  16. " todo
  17. syn keyword modconfTodo        FIXME TODO XXX
  18.  
  19. " keywords and similar
  20. syn match   modconfBegin    "^" skipwhite nextgroup=modconfCommand,modconfComment
  21.  
  22. syn match   modconfCommand  "\(add\s\+\)\=(above\|below\|probe\|probeall\}"
  23. syn region  modconfCommand  transparent matchgroup=modconfCommand start="\(add\s\+\)\=options" skip="\\$" end="$" contains=modconfModOpt
  24. syn keyword modconfCommand  define remove keep install insmod_opt else endif
  25. syn keyword modconfCommand  nextgroup=modconfPath skipwhite alias depfile generic_stringfile pcimapfile include isapnpmapfile usbmapfile parportmapfile ieee1394mapfile pnpbiosmapfile persistdir prune
  26. syn match   modconfCommand  "path\(\[\w\+\]\)\=" nextgroup=modconfPath skipwhite
  27. syn region  modconfCommand  transparent matchgroup=modconfCommand start="^\s*\(if\|elseif\)" skip="\\$" end="$" contains=modconfOp
  28. syn region  modconfCommand  transparent matchgroup=modconfCommand start="^\s*\(post\|pre\)-\(install\|remove\)" skip="\\$" end="$"
  29.  
  30.  
  31. " expressions and similay
  32. syn match   modconfOp        contained "\s-[fnk]\>"
  33. syn region  modconfPath        contained start="\(=\@=\)\=/" skip="\\$" end="\\\@!\_s"
  34. syn match   modconfModOpt   contained "\<\w\+=\@="
  35.  
  36. if exists("modconf_minlines")
  37.     let b:modconf_minlines = modconf_minlines
  38. else
  39.     let b:modconf_minlines = 50
  40. endif
  41. exec "syn sync minlines=" . b:modconf_minlines
  42.  
  43. " Define the default highlighting.
  44. " For version 5.7 and earlier: only when not done already
  45. " For version 5.8 and later: only when an item doesn't have highlighting yet
  46. if version >= 508 || !exists("did_modconf_syn_inits")
  47.     if version < 508
  48.     let did_modconf_syn_inits = 1
  49.     command -nargs=+ HiLink hi link <args>
  50.     else
  51.     command -nargs=+ HiLink hi def link <args>
  52.     endif
  53.  
  54.     HiLink modconfComment   Comment
  55.     HiLink modconfTodo        Todo
  56.     HiLink modconfCommand   Keyword
  57.     HiLink modconfPath        String
  58.     HiLink modconfOp        Identifier
  59.     HiLink modconfModOpt    Identifier
  60.     delcommand HiLink
  61. endif
  62.  
  63. let b:current_syntax = "modconf"
  64.  
  65. " vim: set sts=4 sw=4:
  66.