From 13d042cf8f7fc004729a6dc2408cd9b427a07059 Mon Sep 17 00:00:00 2001 From: Gregory Chamberlain Date: Thu, 6 Feb 2020 03:59:59 +0000 Subject: [PATCH] =?UTF-8?q?rc=20git:=20Fix=20highlighting=20of=20=E2=80=98?= =?UTF-8?q?:git=20log=20--graph=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Looks like hyphens and periods are sometimes printed as part of git-log(1)’s graphing feature; for example, in this repository: git log --graph 55e7f857 --- rc/tools/git.kak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rc/tools/git.kak b/rc/tools/git.kak index c14e3e06..9ddcfce8 100644 --- a/rc/tools/git.kak +++ b/rc/tools/git.kak @@ -3,9 +3,9 @@ declare-option -docstring "name of the client in which documentation is to be di hook -group git-log-highlight global WinSetOption filetype=git-log %{ add-highlighter window/git-log group - add-highlighter window/git-log/ regex '^([\*|\\ /_])*' 0:keyword - add-highlighter window/git-log/ regex '^( ?[\*|\\/_])*\h{,3}(commit )?(\b[0-9a-f]{4,40}\b)' 2:keyword 3:comment - add-highlighter window/git-log/ regex '^( ?[\*|\\/_])*\h{,3}([a-zA-Z_-]+:) (.*?)$' 2:variable 3:value + add-highlighter window/git-log/ regex '^([*|\\ /_.-])*' 0:keyword + add-highlighter window/git-log/ regex '^( ?[*|\\ /_.-])*\h{,3}(commit )?(\b[0-9a-f]{4,40}\b)' 2:keyword 3:comment + add-highlighter window/git-log/ regex '^( ?[*|\\ /_.-])*\h{,3}([a-zA-Z_-]+:) (.*?)$' 2:variable 3:value add-highlighter window/git-log/ ref diff # highlight potential diffs from the -p option hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/git-log }