Start anew
[msysgit.git] / share / vim / vim58 / syntax / debchangelog.vim
blob577b48d3eb0c9bc218508883a9e327f710931cd5
1 " Vim syntax file
2 " Language:     Debian changelog files
3 " Maintainer:   Wichert Akkerman <wakkerma@debian.org>
4 " Last Change:  30 April 2001
6 " Standard syntax initialization
7 if version < 600
8   syntax clear
9 elseif exists("b:current_syntax")
10   finish
11 endif
13 " Case doesn't matter for us
14 syn case ignore
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")
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
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
49   delcommand HiLink
50 endif
52 let b:current_syntax = "debchangelog"
54 " vim: ts=8 sw=2