2 " Language: StGit 'stg edit' commit message file
3 " Author: Zane Bitter <zane.bitter@alliedtelesis.co.nz>
5 if exists("b:current_syntax")
9 syn include @stgDiff syntax/diff.vim
21 syn region stgeditHeaders start="\%^\S\+:" end="^$" nextgroup=stgeditFirstLine skipempty contains=stgeditHeaderKey,stgeditEmailAddr
22 syn match stgeditHeaderKey "^\S\+:" contained
23 syn match stgeditEmailAddr "<.\{-}>" contained contains=@NoSpell
24 syn match stgeditFirstLine "^.\+" contained nextgroup=stgeditDiffs,stgeditComment,stgeditBlank skipnl
25 syn match stgeditSummary "^.\{0,50\}" contained containedin=stgeditFirstLine nextgroup=stgeditOverflow contains=@Spell
26 syn match stgeditOverflow ".*" contained contains=@Spell
27 syn match stgeditBlank "^.\+" contained contains=@Spell
28 syn match stgeditComment "^#.*"
29 syn region stgeditDiffs start="^---" end="%$" contains=@stgDiff fold
30 syn region stgeditDiff start="^\%(diff --git \)\@=" end="^\%(diff --git \|$\)\@=" contained containedin=stgeditDiffs contains=@stgDiff fold
32 hi def link stgeditHeaderKey Type
33 hi def link stgeditEmailAddr Special
34 hi def link stgeditSummary Keyword
35 hi def link stgeditComment Comment
36 hi def link stgeditBlank Error
39 let b:current_syntax = "stgedit"