2012-07-31 16:22:57 +04:00
|
|
|
hook global BufCreate .*\.(diff|patch) %{
|
2012-06-27 16:29:12 +04:00
|
|
|
setb 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
|
|
|
|
addhl -group diff-highlight regex "^\+[^\n]*\n" green default
|
|
|
|
addhl -group diff-highlight regex "^-[^\n]*\n" red default
|
|
|
|
addhl -group diff-highlight regex "^@@[^\n]*@@" cyan default
|
|
|
|
}
|
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
|
|
|
}
|