summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vim/syntax/vala.vim10
1 files 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