2 " Language: Debian changelog files
3 " Maintainer: Wichert Akkerman <wakkerma@debian.org>
4 " Last Change: 30 April 2001
6 " Standard syntax initialization
9 elseif exists("b:current_syntax")
13 " Case doesn't matter for us
16 " Define some common expressions we can use later on
17 syn match debchangelogName contained "^[[:alpha:]][[:alnum:].+-]\+ "
18 syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\)"
19 syn match debchangelogTarget contained "\( stable\| frozen\| unstable\| experimental\)\+"
20 syn match debchangelogVersion contained "(.\{-})"
21 syn match debchangelogCloses contained "closes:\s*\(bug\)\=#\s\=\d\+\(,\s*\(bug\)\=#\s\=\d\+\)*"
22 syn match debchangelogEmail contained "[_=[:alnum:].+-]\+@[[:alnum:]./\-]\+"
23 syn match debchangelogEmail contained "<.\{-}>"
25 " Define the entries that make up the changelog
26 syn region debchangelogHeader start="^[^ ]" end="$" contains=debchangelogName,debchangelogUrgency,debchangelogTarget,debchangelogVersion oneline
27 syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail oneline
28 syn region debchangelogEntry start="^ " end="$" contains=debchangelogCloses oneline
30 " Associate our matches and regions with pretty colours
31 if version >= 508 || !exists("did_debchangelog_syn_inits")
33 let did_debchangelog_syn_inits = 1
34 command -nargs=+ HiLink hi link <args>
36 command -nargs=+ HiLink hi def link <args>
39 HiLink debchangelogHeader Error
40 HiLink debchangelogFooter Identifier
41 HiLink debchangelogEntry Normal
42 HiLink debchangelogCloses Statement
43 HiLink debchangelogUrgency Identifier
44 HiLink debchangelogName Comment
45 HiLink debchangelogVersion Identifier
46 HiLink debchangelogTarget Identifier
47 HiLink debchangelogEmail Special
52 let b:current_syntax = "debchangelog"