Permalink
Browse files

Add folding from vim-multimarkdown plugin

  • Loading branch information...
1 parent a5141b7 commit 0b377fd18e4157be3cec1561e17144edb3af4be5 @neror committed Oct 22, 2012
Showing with 20 additions and 0 deletions.
  1. +20 −0 syntax/markdown.vim
View
@@ -108,3 +108,23 @@ let b:current_syntax = "markdown"
delcommand HtmlHiLink
" vim: tabstop=2
+
+" fold region for headings
+syn region mkdHeaderFold
+ \ start="^\s*\z(#\+\)"
+ \ skip="^\s*\z1#\+"
+ \ end="^\(\s*#\)\@="
+ \ fold contains=TOP
+
+" fold region for references
+syn region mkdReferenceFold
+ \ start="^<!--\z(\S*\)-->"
+ \ end="^<!--END\z1-->"
+ \ fold contains=TOP
+
+" fold region for lists
+syn region mkdListFold
+ \ start="^\z(\s*\)\*\z(\s*\)"
+ \ skip="^\z1 \z2\s*[^#]"
+ \ end="^\(.\)\@="
+ \ fold contains=TOP

0 comments on commit 0b377fd

Please sign in to comment.