kakoune/src/rc/diff.kak
Maxime Coste feff965ac6 Remove setg/setb/setw and use set <scope>
(with scope a prefix of global,buffer or window)
2013-10-30 09:38:40 +00:00

15 lines
424 B
Plaintext

hook global BufCreate .*\.(diff|patch) %{
set buffer filetype diff
}
hook global WinSetOption filetype=diff %{
addhl group diff-highlight
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
}
hook global WinSetOption filetype=(?!diff).* %{
rmhl diff-highlight
}