changelog.vim 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. " Vim syntax file
  2. " Language: generic ChangeLog file
  3. " Written By: Gediminas Paulauskas <menesis@delfi.lt>
  4. " Maintainer: Corinna Vinschen <vinschen@redhat.com>
  5. " Last Change: June 1, 2003
  6. " quit when a syntax file was already loaded
  7. if exists("b:current_syntax")
  8. finish
  9. endif
  10. syn case ignore
  11. if exists('b:changelog_spacing_errors')
  12. let s:spacing_errors = b:changelog_spacing_errors
  13. elseif exists('g:changelog_spacing_errors')
  14. let s:spacing_errors = g:changelog_spacing_errors
  15. else
  16. let s:spacing_errors = 1
  17. endif
  18. if s:spacing_errors
  19. syn match changelogError "^ \+"
  20. endif
  21. syn match changelogText "^\s.*$" contains=changelogMail,changelogNumber,changelogMonth,changelogDay,changelogError
  22. syn match changelogHeader "^\S.*$" contains=changelogNumber,changelogMonth,changelogDay,changelogMail
  23. syn region changelogFiles start="^\s\+[+*]\s" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend
  24. syn region changelogFiles start="^\s\+[([]" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend
  25. syn match changelogFuncs contained "(.\{-})" extend
  26. syn match changelogFuncs contained "\[.\{-}]" extend
  27. syn match changelogColon contained ":"
  28. syn match changelogBullet contained "^\s\+[+*]\s" contains=changelogError
  29. syn match changelogMail contained "<[A-Za-z0-9\._:+-]\+@[A-Za-z0-9\._-]\+>"
  30. syn keyword changelogMonth contained jan feb mar apr may jun jul aug sep oct nov dec
  31. syn keyword changelogDay contained mon tue wed thu fri sat sun
  32. syn match changelogNumber contained "[.-]*[0-9]\+"
  33. " Define the default highlighting.
  34. " Only when an item doesn't have highlighting yet
  35. hi def link changelogText Normal
  36. hi def link changelogBullet Type
  37. hi def link changelogColon Type
  38. hi def link changelogFiles Comment
  39. hi def link changelogFuncs Comment
  40. hi def link changelogHeader Statement
  41. hi def link changelogMail Special
  42. hi def link changelogNumber Number
  43. hi def link changelogMonth Number
  44. hi def link changelogDay Number
  45. hi def link changelogError Folded
  46. let b:current_syntax = "changelog"
  47. " vim: ts=8