summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2012-01-28 19:40:35 +0100
committerSebastian Reichel <sre@ring0.de>2012-01-28 19:40:35 +0100
commitc957a8b6d097a57f001dad8ed1c99ae1bb71ebdd (patch)
tree0ade5d5e0cef8f76d5a7e85f019b388d0bcacd20
parent3cf77b5c433073d392022a5c4de4de56ad26f795 (diff)
downloadvim-config-c957a8b6d097a57f001dad8ed1c99ae1bb71ebdd.tar.bz2
enable if 0 commenting for vala
-rw-r--r--vim/syntax/vala.vim1
-rw-r--r--vimrc3
2 files changed, 2 insertions, 2 deletions
diff --git a/vim/syntax/vala.vim b/vim/syntax/vala.vim
index 2fa194f..c8de41e 100644
--- a/vim/syntax/vala.vim
+++ b/vim/syntax/vala.vim
@@ -86,6 +86,7 @@ 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\)\>"
+" Comment if 0 blocks (ported from c.vim)
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
diff --git a/vimrc b/vimrc
index 5c2e274..2dd4b75 100644
--- a/vimrc
+++ b/vimrc
@@ -64,8 +64,7 @@ au BufRead,BufNewFile *.vala setfiletype vala
au BufRead,BufNewFile *.vapi setfiletype vala
au BufRead,BufNewFile *.gtkaml setfiletype vala
let vala_comment_strings = 1
-let vala_comment_ifdef = 1
-"let vala_space_errors = 1
+let vala_space_errors = 1 " highlight space errors in vala code
" add support for subtitle files
au BufNewFile,BufRead *.ssa setf ssa