From 25261531505a4159b8518dbe095ccbc2dafd25d6 Mon Sep 17 00:00:00 2001 From: Liu Hao Date: Thu, 7 Dec 2017 17:16:06 +0800 Subject: [PATCH 5/9] syntax: remove colorization of labels in C This colors the colon in `private:` in C++. It also does not handle all cases reliably such as interjected comments. So it is removed. Signed-off-by: Liu Hao --- syntax/c.nanorc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syntax/c.nanorc b/syntax/c.nanorc index 2ea46040..4f9cc5ca 100644 --- a/syntax/c.nanorc +++ b/syntax/c.nanorc @@ -6,8 +6,8 @@ comment "//" # Constants. color brightred "\<[A-Z_][0-9A-Z_]+\>" -# Labels. -color brightmagenta "^[[:space:]]*[A-Z_a-z]+:[[:space:]]*$" +# Labels. It colors the colon in `private:` and does not handle all cases reliably. +###color brightmagenta "^[[:space:]]*[A-Z_a-z]+:[[:space:]]*$" color green "\<(float|double|bool|true|false|char|int|short|long|sizeof|align(as|of)|decltype|typeid|enum|void|auto|static|const|struct|union|typedef|extern|(un)?signed|inline|constexpr|thread_local|restrict|_Complex|_Bool|_Imaginary|_Atomic|_Thread_local|_Noreturn|_Align(as|of))\>" color green "\<((s?size)|ptrdiff|((u_?)?int(8|16|32|64|ptr|max))|wchar|char(16|32))_t\>" -- 2.15.0