From e7e9b8a6cd0657380e3fc7612467b690d52b5692 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 27 Jun 2012 14:29:12 +0200 Subject: [PATCH] add rc/diff.kak and load in kakrc --- src/kakrc | 1 + src/rc/diff.kak | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 src/rc/diff.kak diff --git a/src/kakrc b/src/kakrc index e91d5a85..4fc8cd37 100644 --- a/src/kakrc +++ b/src/kakrc @@ -5,3 +5,4 @@ runtime rc/cpp.kak runtime rc/kakrc.kak runtime rc/git.kak runtime rc/global.kak +runtime rc/diff.kak diff --git a/src/rc/diff.kak b/src/rc/diff.kak new file mode 100644 index 00000000..975f73d0 --- /dev/null +++ b/src/rc/diff.kak @@ -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