forked from mpetrov/vim-diffstat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiffstat.vim
More file actions
34 lines (25 loc) · 1.05 KB
/
diffstat.vim
File metadata and controls
34 lines (25 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
scriptencoding utf-8
if exists('b:diffstat_syntax')
finish
endif
syntax match diffStatBranch '\v\S+$'
highlight default link diffStatBranch Keyword
syntax keyword diffStatBin Bin
highlight default link diffStatBin Comment
highlight default DiffStatAddHl ctermfg=green
highlight default DiffStatRemoveHl ctermfg=red
syntax match diffStatRemove '\v\-+'
highlight default link diffStatRemove DiffStatRemoveHl
syntax match diffStatAdd '\v\++'
highlight default link diffStatAdd DiffStatAddHl
syntax match diffStatSeparator '\v\|'
highlight default link diffStatSeparator Comment
syn region diffStatLine start='|' end='\n'
\ contains=diffStatAdd,diffStatRemove,diffStatSeparator,diffStatBin
syn region diffStatFile start='\v^[^#]' end='|\@=' skip=/\\|/
highlight default link diffStatFile Normal
syn region diffStatComment start='\v^#' end='\n' contains=diffStatBranch
highlight default link diffStatComment Comment
syntax match diffStatTotals '\v^.*file.*change.*insertion.*deletion.*$'
highlight default link diffStatTotals Comment
let b:diffstat_syntax = 'diffstat'