From e2e2be6e443537276c8827e6434fc942f6f7bee2 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Sat, 17 Aug 2019 15:00:27 +0100 Subject: [PATCH] Don't syntax highlight text after #{warning,error} --- after/syntax/c.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/after/syntax/c.vim b/after/syntax/c.vim index 74c06a3..fcbac32 100644 --- a/after/syntax/c.vim +++ b/after/syntax/c.vim @@ -1,6 +1,9 @@ " Language: C " Description: Additional C syntax file. +" Don't syntax highlight text after #warning or #error +syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend + if !exists('c_no_function') && !exists('cpp_no_function') " Match function expressions: expr() " ^^^^