From: Ben Williams Date: Thu, 15 Nov 2012 21:02:26 +0000 (-0500) Subject: Get rid of that "fold any preamble" thing since it folds the whole file by default. X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/cd4ca88ddafeea5a7bb3cfa27c31142f20709113?ds=sidebyside Get rid of that "fold any preamble" thing since it folds the whole file by default. --- 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 '='