Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #7 from matze/user-defined-foldtext

Add option to disable overriding foldtext
  • Loading branch information...
commit 87fd42e55dd8516090723a83dd5c5352b1b87488 2 parents 3ebf75d + 1ce4176
@nelstrom authored
Showing with 14 additions and 1 deletion.
  1. +9 −1 after/ftplugin/markdown/folding.vim
  2. +5 −0 doc/markdown-folding.txt
View
10 after/ftplugin/markdown/folding.vim
@@ -98,8 +98,16 @@ if !exists('g:markdown_fold_style')
let g:markdown_fold_style = 'stacked'
endif
+if !exists('g:markdown_fold_override_foldtext')
+ let g:markdown_fold_override_foldtext = 1
+endif
+
setlocal foldmethod=expr
-let &l:foldtext = s:SID() . 'FoldText()'
+
+if g:markdown_fold_override_foldtext
+ let &l:foldtext = s:SID() . 'FoldText()'
+endif
+
let &l:foldexpr =
\ g:markdown_fold_style ==# 'nested'
\ ? 'NestedMarkdownFolds()'
View
5 doc/markdown-folding.txt
@@ -73,4 +73,9 @@ The fold style is scoped to each window, which means it's possible to use the
stacked folding style in one split window, and the nested folding style in
another.
+ *g:markdown_fold_override_foldtext*
+If set to 0, the fold text will not be overriden:>
+ let g:markdown_fold_override_foldtext = 0
+<
+
vim:tw=78:ts=8:ft=help:norl:
Please sign in to comment.
Something went wrong with that request. Please try again.