2012-07-31 14:22:57 +02:00
|
|
|
hook global BufCreate .*\.(diff|patch) %{
|
2012-06-27 14:29:12 +02:00
|
|
|
setb filetype diff
|
2012-07-31 14:22:57 +02:00
|
|
|
}
|
2012-06-27 14:29:12 +02:00
|
|
|
|
2012-07-31 14:22:57 +02:00
|
|
|
hook global WinSetOption filetype=diff %{
|
|
|
|
addhl group diff-highlight
|
2012-08-07 00:13:54 +02:00
|
|
|
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
|
2012-07-31 14:22:57 +02:00
|
|
|
}
|
2012-06-27 14:29:12 +02:00
|
|
|
|
2012-07-31 14:22:57 +02:00
|
|
|
hook global WinSetOption filetype=(?!diff).* %{
|
2012-06-27 14:29:12 +02:00
|
|
|
rmhl diff-highlight
|
2012-07-31 14:22:57 +02:00
|
|
|
}
|