Permalink
Browse files

Add folding to comments and blocks.

Used Sohgo Takeuchi's patch file.
  • Loading branch information...
1 parent 9fa2bbc commit bc5fd07cddb76407ef441c3ed5fe6c9054e630d6 @JesseKPhillips committed Mar 12, 2011
Showing with 8 additions and 4 deletions.
  1. +8 −4 d.vim
View
12 d.vim
@@ -163,12 +163,12 @@ if exists("d_comment_strings")
syn region dBlockCommentString contained start=+"+ end=+"+ end=+\*/+me=s-1,he=s-1 contains=dCommentStar,dUnicode,dEscSequence,@Spell
syn region dNestedCommentString contained start=+"+ end=+"+ end="+"me=s-1,he=s-1 contains=dCommentPlus,dUnicode,dEscSequence,@Spell
syn region dLineCommentString contained start=+"+ end=+$\|"+ contains=dUnicode,dEscSequence,@Spell
- syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell
- syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell
+ syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell fold
+ syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell fold
syn match dLineComment "//.*" contains=dLineCommentString,dTodo,@Spell
else
- syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell
- syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell
+ syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell fold
+ syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell fold
syn match dLineComment "//.*" contains=dLineCommentString,dTodo,@Spell
endif
@@ -282,6 +282,10 @@ syn case match
" TODO: Highlight following Integer and optional Filespec.
syn region dPragma start="#\s*\(line\>\)" skip="\\$" end="$"
+" Block
+"
+syn region dBlock start="{" end="}" transparent fold
+
" The default highlighting.
"

0 comments on commit bc5fd07

Please sign in to comment.