desc.vim 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. " Vim syntax file
  2. " Language: T2 / ROCK Linux .desc
  3. " Maintainer: René Rebe <rene@exactcode.de>, Piotr Esden-Tempski <esden@rocklinux.org>
  4. " Last Change: 2006 Aug 14
  5. " quit when a syntax file was already loaded
  6. if exists("b:current_syntax")
  7. finish
  8. endif
  9. " syntax definitions
  10. setl iskeyword+=-
  11. syn keyword descFlag DIETLIBC KAFFE JAIL NOPARALLEL FPIC-QUIRK LIBTOOL-WUIRK NO-LIBTOOL-FIX AUTOMAKE-QUIRK NO-AS-NEEDED NO-SSP KERNEL INIT LIBC CC CXX F77 KCC contained
  12. syn keyword descLicense Unknown GPL LGPL FDL MIT BSD OpenSource Free-to-use Commercial contained
  13. " tags
  14. syn match descTag /^\[\(COPY\)\]/
  15. syn match descTag /^\[\(I\|TITLE\)\]/
  16. syn match descTag /^\[\(T\|TEXT\)\]/ contained
  17. syn match descTag /^\[\(U\|URL\)\]/
  18. syn match descTag /^\[\(A\|AUTHOR\)\]/
  19. syn match descTag /^\[\(M\|MAINTAINER\)\]/
  20. syn match descTag /^\[\(C\|CATEGORY\)\]/ contained
  21. syn match descTag /^\[\(F\|FLAG\)\]/ contained
  22. syn match descTag /^\[\(E\|DEP\|DEPENDENCY\)\]/
  23. syn match descTag /^\[\(R\|ARCH\|ARCHITECTURE\)\]/
  24. syn match descTag /^\[\(L\|LICENSE\)\]/ contained
  25. syn match descTag /^\[\(S\|STATUS\)\]/
  26. syn match descTag /^\[\(O\|CONF\)\]/
  27. syn match descTag /^\[\(V\|VER\|VERSION\)\]/
  28. syn match descTag /^\[\(P\|PRI\|PRIORITY\)\]/ nextgroup=descInstall skipwhite
  29. syn match descTag /^\[\(D\|DOWN\|DOWNLOAD\)\]/ nextgroup=descSum skipwhite
  30. " misc
  31. syn match descUrl /\w\+:\/\/\S\+/
  32. syn match descCategory /\w\+\/\w\+/ contained
  33. syn match descEmail /<[\.A-Za-z0-9]\+@[\.A-Za-z0-9]\+>/
  34. " priority tag
  35. syn match descInstallX /X/ contained
  36. syn match descInstallO /O/ contained
  37. syn match descInstall /[OX]/ contained contains=descInstallX,descInstallO nextgroup=descStage skipwhite
  38. syn match descDash /-/ contained
  39. syn match descDigit /\d/ contained
  40. syn match descStage /[\-0][\-1][\-2][\-3][\-4][\-5][\-6][\-7][\-8][\-9]/ contained contains=descDash,descDigit nextgroup=descCompilePriority skipwhite
  41. syn match descCompilePriority /\d\{3}\.\d\{3}/ contained
  42. " download tag
  43. syn match descSum /\d\+/ contained nextgroup=descTarball skipwhite
  44. syn match descTarball /\S\+/ contained nextgroup=descUrl skipwhite
  45. " tag regions
  46. syn region descText start=/^\[\(T\|TEXT\)\]/ end=/$/ contains=descTag,descUrl,descEmail
  47. syn region descTagRegion start=/^\[\(C\|CATEGORY\)\]/ end=/$/ contains=descTag,descCategory
  48. syn region descTagRegion start=/^\[\(F\|FLAG\)\]/ end=/$/ contains=descTag,descFlag
  49. syn region descTagRegion start=/^\[\(L\|LICENSE\)\]/ end=/$/ contains=descTag,descLicense
  50. " Only when an item doesn't have highlighting yet
  51. hi def link descFlag Identifier
  52. hi def link descLicense Identifier
  53. hi def link descCategory Identifier
  54. hi def link descTag Type
  55. hi def link descUrl Underlined
  56. hi def link descEmail Underlined
  57. " priority tag colors
  58. hi def link descInstallX Boolean
  59. hi def link descInstallO Type
  60. hi def link descDash Operator
  61. hi def link descDigit Number
  62. hi def link descCompilePriority Number
  63. " download tag colors
  64. hi def link descSum Number
  65. hi def link descTarball Underlined
  66. " tag region colors
  67. hi def link descText Comment
  68. let b:current_syntax = "desc"