kakoune/rc/diff.kak

12 lines
381 B
Plaintext
Raw Normal View History

hook global BufCreate .*\.(diff|patch) %{
set buffer filetype diff
}
2012-06-27 14:29:12 +02:00
addhl -group / group diff
addhl -group /diff regex "^\+[^\n]*\n" 0:green,default
addhl -group /diff regex "^-[^\n]*\n" 0:red,default
addhl -group /diff regex "^@@[^\n]*@@" 0:cyan,default
2012-06-27 14:29:12 +02:00
hook global WinSetOption filetype=diff %{ addhl ref diff }
hook global WinSetOption filetype=(?!diff).* %{ rmhl diff }