kakoune/src/rc/diff.kak

15 lines
418 B
Plaintext
Raw Normal View History

hook global BufCreate .*\.(diff|patch) %{
2012-06-27 14:29:12 +02:00
setb filetype diff
}
2012-06-27 14:29:12 +02:00
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
}
2012-06-27 14:29:12 +02:00
hook global WinSetOption filetype=(?!diff).* %{
2012-06-27 14:29:12 +02:00
rmhl diff-highlight
}