1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-29 10:02:57 +03:00
kakoune/rc/core/diff.kak

12 lines
489 B
Plaintext
Raw Normal View History

hook global BufCreate .*\.(diff|patch) %{
set buffer filetype diff
}
2012-06-27 16:29:12 +04:00
2017-01-04 03:07:45 +03:00
add-highlighter -group / group diff
add-highlighter -group /diff regex "^\+[^\n]*\n" 0:green,default
add-highlighter -group /diff regex "^-[^\n]*\n" 0:red,default
add-highlighter -group /diff regex "^@@[^\n]*@@" 0:cyan,default
2012-06-27 16:29:12 +04:00
2017-01-04 03:07:45 +03:00
hook -group diff-highlight global WinSetOption filetype=diff %{ add-highlighter ref diff }
hook -group diff-highlight global WinSetOption filetype=(?!diff).* %{ remove-highlighter diff }