blob: fcd0e91f78d04e123d35b3133d3d90235badda6b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
hook global BufCreate .*\.(diff|patch) %{
setb filetype diff
}
hook global WinSetOption filetype=diff %{
addhl group diff-highlight
addhl -group diff-highlight regex "^\+[^\n]*\n" 0:green,default
addhl -group diff-highlight regex "^-[^\n]*\n" 0:red,default
addhl -group diff-highlight regex "^@@[^\n]*@@" 0:cyan,default
}
hook global WinSetOption filetype=(?!diff).* %{
rmhl diff-highlight
}
|