2012-07-31 16:22:57 +04:00
|
|
|
hook global BufCreate .*\.(diff|patch) %{
|
2013-10-30 13:38:40 +04:00
|
|
|
set buffer filetype diff
|
2012-07-31 16:22:57 +04:00
|
|
|
}
|
2012-06-27 16:29:12 +04:00
|
|
|
|
2015-08-24 21:17:50 +03: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 16:29:12 +04:00
|
|
|
|
2016-09-25 16:15:07 +03:00
|
|
|
hook -group diff-highlight global WinSetOption filetype=diff %{ addhl ref diff }
|
2016-09-28 09:45:01 +03:00
|
|
|
hook -group diff-highlight global WinSetOption filetype=(?!diff).* %{ rmhl diff }
|