From: todesking Date: Mon, 7 Apr 2014 16:02:51 +0000 (+0900) Subject: Foldmethod: improve performance X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/2eaed44e965cf5a9a84a0cfbbf654c3b7b8f46b2?ds=inline Foldmethod: improve performance --- diff --git a/after/ftplugin/markdown.vim b/after/ftplugin/markdown.vim index 94267ee..997ab9d 100644 --- a/after/ftplugin/markdown.vim +++ b/after/ftplugin/markdown.vim @@ -11,7 +11,8 @@ func! s:is_mkdCode(lnum) endfunc func! s:effective_line(lnum) - return s:is_mkdCode(a:lnum) ? '' : getline(a:lnum) + let line = getline(a:lnum) + return (line !~ '^=\|^#' || s:is_mkdCode(a:lnum)) ? '' : line endfunc func! Foldexpr_markdown(lnum)