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