From cd4ca88ddafeea5a7bb3cfa27c31142f20709113 Mon Sep 17 00:00:00 2001 From: Ben Williams Date: Thu, 15 Nov 2012 16:02:26 -0500 Subject: [PATCH] Get rid of that "fold any preamble" thing since it folds the whole file by default. --- after/ftplugin/mkd.vim | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/after/ftplugin/mkd.vim b/after/ftplugin/mkd.vim index f04ae2b..b0b0946 100644 --- a/after/ftplugin/mkd.vim +++ b/after/ftplugin/mkd.vim @@ -7,8 +7,8 @@ " original version from Steve Losh's gist: https://gist.github.com/1038710 func! Foldexpr_markdown(lnum) - if (a:lnum == 0) - let l0 = getline(a:lnum) + if (a:lnum == 1) + let l0 = '' else let l0 = getline(a:lnum-1) endif @@ -29,9 +29,6 @@ func! Foldexpr_markdown(lnum) elseif l0 =~ '^#' " current line starts with hashes return '>'.matchend(l0, '^#\+') - elseif a:lnum == 1 - " fold any 'preamble' - return '>1' else " keep previous foldlevel return '=' -- 2.39.2