manconf.vim 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. " Vim syntax file
  2. " Language: man.conf(5) - man configuration file
  3. " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
  4. " Latest Revision: 2006-04-19
  5. if exists("b:current_syntax")
  6. finish
  7. endif
  8. let s:cpo_save = &cpo
  9. set cpo&vim
  10. syn keyword manconfTodo contained TODO FIXME XXX NOTE
  11. syn region manconfComment display oneline start='^#' end='$'
  12. \ contains=manconfTodo,@Spell
  13. if !has("win32") && $OSTYPE =~ 'bsd'
  14. syn match manconfBegin display '^'
  15. \ nextgroup=manconfKeyword,manconfSection,
  16. \ manconfComment skipwhite
  17. syn keyword manconfKeyword contained _build _crunch
  18. \ nextgroup=manconfExtCmd skipwhite
  19. syn keyword manconfKeyword contained _suffix
  20. \ nextgroup=manconfExt skipwhite
  21. syn keyword manconfKeyword contained _crunch
  22. syn keyword manconfKeyword contained _subdir _version _whatdb
  23. \ nextgroup=manconfPaths skipwhite
  24. syn match manconfExtCmd contained display '\.\S\+'
  25. \ nextgroup=manconfPaths skipwhite
  26. syn match manconfSection contained '[^#_ \t]\S*'
  27. \ nextgroup=manconfPaths skipwhite
  28. syn keyword manconfSection contained _default
  29. \ nextgroup=manconfPaths skipwhite
  30. syn match manconfPaths contained display '\S\+'
  31. \ nextgroup=manconfPaths skipwhite
  32. syn match manconfExt contained display '\.\S\+'
  33. hi def link manconfExtCmd Type
  34. hi def link manconfSection Identifier
  35. hi def link manconfPaths String
  36. else
  37. syn match manconfBegin display '^'
  38. \ nextgroup=manconfBoolean,manconfKeyword,
  39. \ manconfDecompress,manconfComment skipwhite
  40. syn keyword manconfBoolean contained FSSTND FHS NOAUTOPATH NOCACHE
  41. syn keyword manconfKeyword contained MANBIN
  42. \ nextgroup=manconfPath skipwhite
  43. syn keyword manconfKeyword contained MANPATH MANPATH_MAP
  44. \ nextgroup=manconfFirstPath skipwhite
  45. syn keyword manconfKeyword contained APROPOS WHATIS TROFF NROFF JNROFF EQN
  46. \ NEQN JNEQN TBL COL REFER PIC VGRIND GRAP
  47. \ PAGER BROWSER HTMLPAGER CMP CAT COMPRESS
  48. \ DECOMPRESS MANDEFOPTIONS
  49. \ nextgroup=manconfCommand skipwhite
  50. syn keyword manconfKeyword contained COMPRESS_EXT
  51. \ nextgroup=manconfExt skipwhite
  52. syn keyword manconfKeyword contained MANSECT
  53. \ nextgroup=manconfManSect skipwhite
  54. syn match manconfPath contained display '\S\+'
  55. syn match manconfFirstPath contained display '\S\+'
  56. \ nextgroup=manconfSecondPath skipwhite
  57. syn match manconfSecondPath contained display '\S\+'
  58. syn match manconfCommand contained display '\%(/[^/ \t]\+\)\+'
  59. \ nextgroup=manconfCommandOpt skipwhite
  60. syn match manconfCommandOpt contained display '\S\+'
  61. \ nextgroup=manconfCommandOpt skipwhite
  62. syn match manconfExt contained display '\.\S\+'
  63. syn match manconfManSect contained '[^:]\+' nextgroup=manconfManSectSep
  64. syn match manconfManSectSep contained ':' nextgroup=manconfManSect
  65. syn match manconfDecompress contained '\.\S\+'
  66. \ nextgroup=manconfCommand skipwhite
  67. hi def link manconfBoolean Boolean
  68. hi def link manconfPath String
  69. hi def link manconfFirstPath manconfPath
  70. hi def link manconfSecondPath manconfPath
  71. hi def link manconfCommand String
  72. hi def link manconfCommandOpt Special
  73. hi def link manconfManSect Identifier
  74. hi def link manconfManSectSep Delimiter
  75. hi def link manconfDecompress Type
  76. endif
  77. hi def link manconfTodo Todo
  78. hi def link manconfComment Comment
  79. hi def link manconfKeyword Keyword
  80. hi def link manconfExt Type
  81. let b:current_syntax = "manconf"
  82. let &cpo = s:cpo_save
  83. unlet s:cpo_save