From: Hiroshi Shirosaki Date: Tue, 8 Dec 2015 05:05:43 +0000 (+0900) Subject: Lines which start with '-' are needed in foldexpr X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/ed456d2ee6ebe771c7e86179286fda3fc66414bc?ds=inline Lines which start with '-' are needed in foldexpr --- 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