1 syn match diffRemoved "^-.*"
2 syn match diffAdded "^+.*"
4 syn match diffSeparator "^---$"
5 syn match diffSubname " @@..*"ms=s+3 contained
6 syn match diffLine "^@.*" contains=diffSubname
8 syn match diffFile "^diff .*"
9 syn match diffNewFile "^+++ .*"
10 syn match diffOldFile "^--- .*"
12 hi def link diffOldFile diffFile
13 hi def link diffNewFile diffFile
15 hi def link diffFile Type
16 hi def link diffRemoved Special
17 hi def link diffAdded Identifier
18 hi def link diffLine Statement
19 hi def link diffSubname PreProc
21 syntax match gitDiffStatLine /^ .\{-}\zs[+-]\+$/ contains=gitDiffStatAdd,gitDiffStatDelete
22 syntax match gitDiffStatAdd /+/ contained
23 syntax match gitDiffStatDelete /-/ contained
25 hi def link gitDiffStatAdd diffAdded
26 hi def link gitDiffStatDelete diffRemoved