1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-23 23:34:12 +03:00
kakoune/rc/diff.kak

15 lines
424 B
Plaintext
Raw Normal View History

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