forked from rhysd/git-messenger.vim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitmessengerpopup.vim
54 lines (45 loc) · 1.93 KB
/
gitmessengerpopup.vim
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
if exists('b:current_syntax')
finish
endif
syn match gitmessengerHeader '\_^ \%(History\|Commit\|Date\|Author\|Committer\):' display
syn match gitmessengerHash '\%(\_^ \<Commit: \+\)\@<=[[:xdigit:]]\+' display
syn match gitmessengerHistory '\%(\_^ \<History: \+\)\@<=#\d\+' display
syn match gitmessengerEmail '\%(\_^ \<\%(Author\|Committer\): \+.*\)\@<=<.\+>' display
" Diff included in popup
syn match diffRemoved "^ -.*" display
syn match diffAdded "^ +.*" display
syn match diffSubname " @@..*"ms=s+3 contained display
syn match diffLine "^ @.*" contains=diffSubname display
syn match diffLine "^ \<\d\+\>.*" display
syn match diffLine "^ \*\*\*\*.*" display
syn match diffLine "^ ---$" display
" Some versions of diff have lines like "#c#" and "#d#" (where # is a number)
syn match diffLine "^ \d\+\(,\d\+\)\=[cda]\d\+\>.*" display
syn match diffFile "^ diff --git .*" display
syn match diffFile "^ +++ .*" display
syn match diffFile "^ ==== .*" display
syn match diffOldFile "^ \*\*\* .*" display
syn match diffNewFile "^ --- .*" display
syn match diffIndexLine "^ index \x\{7,}\.\.\x\{7,}.*" display
hi def link gitmessengerHeader Identifier
hi def link gitmessengerHash Comment
hi def link gitmessengerHistory Constant
hi def link gitmessengerEmail gitmessengerPopupNormal
hi def link gitmessengerPopupNormal NormalFloat
hi def link diffOldFile diffFile
hi def link diffNewFile diffFile
hi def link diffIndexLine DarkBlue
hi def link diffFile DarkYellow
hi def link diffRemoved DarkRed
hi def link diffAdded DarkGreen
hi def link diffLine DarkPink
hi def link diffSubname DarkBlue
"hi def link diffOldFile diffFile
"hi def link diffNewFile diffFile
"hi def link diffIndexLine PreProc
"hi def link diffFile Type
"hi def link diffRemoved Special
"hi def link diffAdded Identifier
"hi def link diffLine Statement
"hi def link diffSubname PreProc
let b:current_syntax = 'gitmessengerpopup'