From ed8a824c74e53460d3c69384c4ca6542675eabec Mon Sep 17 00:00:00 2001 From: Sebastian Reichel Date: Sat, 28 Jan 2012 19:34:31 +0100 Subject: fix #if 0 #endif comments syntax highlighting in vala --- vim/syntax/vala.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vim/syntax/vala.vim b/vim/syntax/vala.vim index bb5b00a..2fa194f 100644 --- a/vim/syntax/vala.vim +++ b/vim/syntax/vala.vim @@ -83,15 +83,15 @@ else endif endif -if exists("vala_comment_ifdef") +syn region valaPreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 +syn match valaPreCondit display "^\s*\(%:\|#\)\s*\(else\|endif\)\>" + +if !exists("vala_no_if0") syn region valaCppOut start="^\s*\(%:\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=valaCppOut2 fold syn region valaCppOut2 contained start="0" end="^\s*\(%:\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=valaSpaceError,valaCppSkip syn region valaCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=valaSpaceError,valaCppSkip endif -syn region valaPreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 -syn match valaPreCondit display "^\s*\(%:\|#\)\s*\(else\|endif\)\>" - " match comment errors syntax match valaCommentError display "\*/" syntax match valaCommentStartError display "/\*"me=e-1 contained @@ -184,7 +184,7 @@ hi def link valaUnicodeSpecifier SpecialChar hi def link valaPreCondit PreCondit -if exists("vala_comment_ifdef") +if !exists("vala_no_if0") hi def link valaCppSkip valaCppOut hi def link valaCppOut2 valaCppOut hi def link valaCppOut Comment -- cgit v1.2.3