2012-07-31 14:22:57 +02:00
|
|
|
hook global BufCreate .*\.(diff|patch) %{
|
2013-10-30 10:38:40 +01:00
|
|
|
set buffer filetype diff
|
2012-07-31 14:22:57 +02:00
|
|
|
}
|
2012-06-27 14:29:12 +02:00
|
|
|
|
2015-08-24 20:17:50 +02:00
|
|
|
addhl -group / group diff
|
|
|
|
addhl -group /diff regex "^\+[^\n]*\n" 0:green,default
|
|
|
|
addhl -group /diff regex "^-[^\n]*\n" 0:red,default
|
|
|
|
addhl -group /diff regex "^@@[^\n]*@@" 0:cyan,default
|
2012-06-27 14:29:12 +02:00
|
|
|
|
2016-09-25 15:15:07 +02:00
|
|
|
hook -group diff-highlight global WinSetOption filetype=diff %{ addhl ref diff }
|
2015-08-24 20:17:50 +02:00
|
|
|
hook global WinSetOption filetype=(?!diff).* %{ rmhl diff }
|