From 424b2389cbc69d41b8d4302a665340a06d3ebe7c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 2 Nov 2017 01:28:37 +0800 Subject: [PATCH] kakrc.kak: Fix highlighting of key words at start of buffer --- rc/core/kakrc.kak | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rc/core/kakrc.kak b/rc/core/kakrc.kak index ce9066aa1..b954962d2 100644 --- a/rc/core/kakrc.kak +++ b/rc/core/kakrc.kak @@ -47,10 +47,10 @@ add-highlighter shared/ regions -default code kakrc \ }" # Highlight keywords (which are always surrounded by whitespace) - printf '%s\n' "add-highlighter shared/kakrc/code regex [\s\A]\K($(join "${keywords}" '|'))(?=[\s\z])\b 0:keyword - add-highlighter shared/kakrc/code regex [\s\A]\K($(join "${attributes}" '|'))(?=[\s\z])\b 0:attribute - add-highlighter shared/kakrc/code regex [\s\A]\K($(join "${types}" '|'))(?=[\s\z])\b 0:type - add-highlighter shared/kakrc/code regex [\s\A]\K($(join "${values}" '|'))(?=[\s\z])\b 0:value" + printf '%s\n' "add-highlighter shared/kakrc/code regex (?:\s|\A)\K($(join "${keywords}" '|'))(?:(?=\s)|\z) 0:keyword + add-highlighter shared/kakrc/code regex (?:\s|\A)\K($(join "${attributes}" '|'))(?:(?=\s)|\z) 0:attribute + add-highlighter shared/kakrc/code regex (?:\s|\A)\K($(join "${types}" '|'))(?:(?=\s)|\z) 0:type + add-highlighter shared/kakrc/code regex (?:\s|\A)\K($(join "${values}" '|'))(?:(?=\s)|\z) 0:value" } add-highlighter shared/kakrc/code regex \brgb:[0-9a-fA-F]{6}\b 0:value