From ed456d2ee6ebe771c7e86179286fda3fc66414bc Mon Sep 17 00:00:00 2001 From: Hiroshi Shirosaki Date: Tue, 8 Dec 2015 14:05:43 +0900 Subject: [PATCH 1/1] Lines which start with '-' are needed in foldexpr --- after/ftplugin/markdown.vim | 2 +- test/folding.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/after/ftplugin/markdown.vim b/after/ftplugin/markdown.vim index 497a5a2..a140c25 100644 --- a/after/ftplugin/markdown.vim +++ b/after/ftplugin/markdown.vim @@ -12,7 +12,7 @@ endfunc func! s:effective_line(lnum) let line = getline(a:lnum) - return (line !~ '^=\|^#' || s:is_mkdCode(a:lnum)) ? '' : line + return (line !~ '^[=-#]' || s:is_mkdCode(a:lnum)) ? '' : line endfunc func! Foldexpr_markdown(lnum) diff --git a/test/folding.md b/test/folding.md index cd123d3..09ede4d 100644 --- a/test/folding.md +++ b/test/folding.md @@ -10,3 +10,7 @@ This is code block ## Capter 2 foobar + +==+ Fold Level 1 + +--+ Fold Level 2 -- 2.39.5