2 " Language: StGit 'stg edit' commit message file
3 " Author: Zane Bitter <zane.bitter@alliedtelesis.co.nz>
5 if exists("b:current_syntax")
10 runtime! syntax/mail.vim
11 unlet b:current_syntax
13 syn include @stgDiff syntax/diff.vim
25 syn match stgeditFrom "\%^From:.*" contains=mailHeader nextgroup=stgeditFirstLine skipempty
26 syn match stgeditFirstLine "^.\+" contained nextgroup=stgeditDiffs,stgeditComment,stgeditBlank skipnl
27 syn match stgeditSummary "^.\{0,50\}" contained containedin=stgeditFirstLine nextgroup=stgeditOverflow contains=@Spell
28 syn match stgeditOverflow ".*" contained contains=@Spell
29 syn match stgeditBlank "^.\+" contained contains=@Spell
30 syn match stgeditComment "^#.*"
31 syn region stgeditDiffs start="^---" end="%$" contains=@stgDiff fold
32 syn region stgeditDiff start="^\%(diff --git \)\@=" end="^\%(diff --git \|$\)\@=" contained containedin=stgeditDiffs contains=@stgDiff fold
34 hi def link stgeditSummary Keyword
35 hi def link stgeditComment Comment
36 hi def link stgeditBlank Error
39 let b:current_syntax = "stgedit"