blob: 577b48d3eb0c9bc218508883a9e327f710931cd5 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" Language: Debian changelog files
3" Maintainer: Wichert Akkerman <wakkerma@debian.org>
4" Last Change: 30 April 2001
5
6" Standard syntax initialization
7if version < 600
8 syntax clear
9elseif exists("b:current_syntax")
10 finish
11endif
12
13" Case doesn't matter for us
14syn case ignore
15
16" Define some common expressions we can use later on
17syn match debchangelogName contained "^[[:alpha:]][[:alnum:].+-]\+ "
18syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\)"
19syn match debchangelogTarget contained "\( stable\| frozen\| unstable\| experimental\)\+"
20syn match debchangelogVersion contained "(.\{-})"
21syn match debchangelogCloses contained "closes:\s*\(bug\)\=#\s\=\d\+\(,\s*\(bug\)\=#\s\=\d\+\)*"
22syn match debchangelogEmail contained "[_=[:alnum:].+-]\+@[[:alnum:]./\-]\+"
23syn match debchangelogEmail contained "<.\{-}>"
24
25" Define the entries that make up the changelog
26syn region debchangelogHeader start="^[^ ]" end="$" contains=debchangelogName,debchangelogUrgency,debchangelogTarget,debchangelogVersion oneline
27syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail oneline
28syn region debchangelogEntry start="^ " end="$" contains=debchangelogCloses oneline
29
30" Associate our matches and regions with pretty colours
31if version >= 508 || !exists("did_debchangelog_syn_inits")
32 if version < 508
33 let did_debchangelog_syn_inits = 1
34 command -nargs=+ HiLink hi link <args>
35 else
36 command -nargs=+ HiLink hi def link <args>
37 endif
38
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
48
49 delcommand HiLink
50endif
51
52let b:current_syntax = "debchangelog"
53
54" vim: ts=8 sw=2