2 " Language: Debian changelog files
3 " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
4 " Former Maintainer: Wichert Akkerman <wakkerma@debian.org>
5 " Last Change: $LastChangedDate: 2006-04-16 21:50:31 -0400 (dom, 16 apr 2006) $
6 " URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/syntax/debchangelog.vim?op=file&rev=0&sc=0
8 " Standard syntax initialization
11 elseif exists("b:current_syntax")
15 " Case doesn't matter for us
18 " Define some common expressions we can use later on
19 syn match debchangelogName contained "^[[:alpha:]][[:alnum:].+-]\+ "
20 syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\|emergency\)\( \S.*\)\="
21 syn match debchangelogTarget contained "\( stable\| frozen\| unstable\| testing-proposed-updates\| experimental\| sarge-backports\| sarge-volatile\| stable-security\| testing-security\)\+"
22 syn match debchangelogVersion contained "(.\{-})"
23 syn match debchangelogCloses contained "closes:\s*\(bug\)\=#\=\s\=\d\+\(,\s*\(bug\)\=#\=\s\=\d\+\)*"
24 syn match debchangelogEmail contained "[_=[:alnum:].+-]\+@[[:alnum:]./\-]\+"
25 syn match debchangelogEmail contained "<.\{-}>"
27 " Define the entries that make up the changelog
28 syn region debchangelogHeader start="^[^ ]" end="$" contains=debchangelogName,debchangelogUrgency,debchangelogTarget,debchangelogVersion oneline
29 syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail oneline
30 syn region debchangelogEntry start="^ " end="$" contains=debchangelogCloses oneline
32 " Associate our matches and regions with pretty colours
33 if version >= 508 || !exists("did_debchangelog_syn_inits")
35 let did_debchangelog_syn_inits = 1
36 command -nargs=+ HiLink hi link <args>
38 command -nargs=+ HiLink hi def link <args>
41 HiLink debchangelogHeader Error
42 HiLink debchangelogFooter Identifier
43 HiLink debchangelogEntry Normal
44 HiLink debchangelogCloses Statement
45 HiLink debchangelogUrgency Identifier
46 HiLink debchangelogName Comment
47 HiLink debchangelogVersion Identifier
48 HiLink debchangelogTarget Identifier
49 HiLink debchangelogEmail Special
54 let b:current_syntax = "debchangelog"