From ee695ecf955be4b0a43ae81c4107f15c51bcb814 Mon Sep 17 00:00:00 2001 From: fsub <31548809+fsub@users.noreply.github.com> Date: Sun, 12 Nov 2017 17:32:42 +0100 Subject: [PATCH] c-familiy.kak: improve highlighting of C++ literals --- rc/core/c-family.kak | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/rc/core/c-family.kak b/rc/core/c-family.kak index d1bf9ebad..1ab0fcc9f 100644 --- a/rc/core/c-family.kak +++ b/rc/core/c-family.kak @@ -178,7 +178,23 @@ add-highlighter shared/c/code regex %{\b-?(0x[0-9a-fA-F]+|\d+)[fdiu]?|'((\\.)?|[ } # c++ specific -add-highlighter shared/cpp/code regex %{\b-?(0x[0-9a-fA-F]+|\d+)[fdiu]?|'((\\.)?|[^'\\])'} 0:value + +# character literals (no multi-character literals) +add-highlighter shared/cpp/code regex %{(\b(u8|u|U|L)|\B)'((\\.)|[^'\\])'\B} 0:value + +# integer literals +add-highlighter shared/cpp/code regex %{(?i)(?