From 13f82dbaacbe47c934414da1a64a059e7b5ed212 Mon Sep 17 00:00:00 2001 From: EinfachToll Date: Fri, 31 Mar 2017 21:38:32 +0200 Subject: [PATCH] Add option for enabling local folding settings Ref #321 --- doc/vimwiki.txt | 2 ++ plugin/vimwiki.vim | 2 ++ 2 files changed, 4 insertions(+) diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt index 493284c..b8c15e5 100644 --- a/doc/vimwiki.txt +++ b/doc/vimwiki.txt @@ -2321,6 +2321,8 @@ Value Description~ 'expr' Folding based on expression (folds sections and code blocks) 'syntax' Folding based on syntax (folds sections; slower than 'expr') 'list' Folding based on expression (folds list subitems; much slower) +'custom' Leave the folding settings as they are (e.g. set by another + plugin) Default: '' diff --git a/plugin/vimwiki.vim b/plugin/vimwiki.vim index ddb4b35..bcbf4de 100644 --- a/plugin/vimwiki.vim +++ b/plugin/vimwiki.vim @@ -167,6 +167,8 @@ function! s:setup_buffer_enter() "{{{ elseif g:vimwiki_folding ==? 'syntax' setlocal fdm=syntax setlocal foldtext=VimwikiFoldText() + elseif g:vimwiki_folding ==? 'custom' + " do nothing else setlocal fdm=manual normal! zE