kakoune/rc/core/diff.kak
Maxime Coste fef0277998 Reorganise rc/ into subdirectories
* core: set of tools to work on kakoune source code
 * base: very common languages and tools
 * extra: less common languages and tools
2016-01-29 09:03:23 +00:00

12 lines
381 B
Plaintext

hook global BufCreate .*\.(diff|patch) %{
set buffer filetype diff
}
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
hook global WinSetOption filetype=diff %{ addhl ref diff }
hook global WinSetOption filetype=(?!diff).* %{ rmhl diff }