2012-07-31 16:22:57 +04:00
|
|
|
hook global BufCreate .*\.(diff|patch) %{
|
2017-11-03 10:34:41 +03:00
|
|
|
set-option buffer filetype diff
|
2012-07-31 16:22:57 +04:00
|
|
|
}
|
2012-06-27 16:29:12 +04:00
|
|
|
|
2017-10-28 06:00:51 +03:00
|
|
|
add-highlighter shared/ group diff
|
|
|
|
add-highlighter shared/diff regex "^\+[^\n]*\n" 0:green,default
|
|
|
|
add-highlighter shared/diff regex "^-[^\n]*\n" 0:red,default
|
|
|
|
add-highlighter shared/diff regex "^@@[^\n]*@@" 0:cyan,default
|
2012-06-27 16:29:12 +04:00
|
|
|
|
2017-10-28 06:00:51 +03:00
|
|
|
hook -group diff-highlight global WinSetOption filetype=diff %{ add-highlighter window ref diff }
|
|
|
|
hook -group diff-highlight global WinSetOption filetype=(?!diff).* %{ remove-highlighter window/diff }
|