1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-22 11:01:48 +03:00
kakoune/rc/core/diff.kak

12 lines
506 B
Plaintext
Raw Normal View History

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