1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-18 17:02:06 +03:00

add rc/diff.kak and load in kakrc

This commit is contained in:
Maxime Coste 2012-06-27 14:29:12 +02:00
parent 70bd18e1f2
commit e7e9b8a6cd
2 changed files with 12 additions and 0 deletions

View File

@ -5,3 +5,4 @@ runtime rc/cpp.kak
runtime rc/kakrc.kak runtime rc/kakrc.kak
runtime rc/git.kak runtime rc/git.kak
runtime rc/global.kak runtime rc/global.kak
runtime rc/diff.kak

11
src/rc/diff.kak Normal file
View File

@ -0,0 +1,11 @@
hook global BufCreate .*\.diff \
setb filetype diff
hook global WinSetOption filetype=diff \
addhl group diff-highlight; \
addhl -group diff-highlight regex "^\+[^\n]*\n" green default; \
addhl -group diff-highlight regex "^-[^\n]*\n" red default; \
addhl -group diff-highlight regex "^@@[^\n]*@@" cyan default;
hook global WinSetOption filetype=(?!diff).* \
rmhl diff-highlight