summaryrefslogtreecommitdiffstats
path: root/vim
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2012-01-28 19:34:31 +0100
committerSebastian Reichel <sre@ring0.de>2012-01-28 19:34:31 +0100
commited8a824c74e53460d3c69384c4ca6542675eabec (patch)
tree36987e6c97a08979d496881c711c3a2a68253378 /vim
parent23ed2175a72e244a49b0bdfdf5f4bc7dcd14c69e (diff)
downloadvim-config-ed8a824c74e53460d3c69384c4ca6542675eabec.tar.bz2
fix #if 0 #endif comments syntax highlighting in vala
Diffstat (limited to 'vim')
-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