From 0c61f835a73119eb80e68d27cf95136c36aa092b Mon Sep 17 00:00:00 2001 From: Bart Bakker Date: Fri, 3 Oct 2014 16:44:34 +0200 Subject: [PATCH] Respect Vim's global fold config Deleted overriding global fold configuration for markdown buffers and improved README on purpose of vim_markdown_folding_disabled. --- README.md | 8 +++++++- after/ftplugin/mkd.vim | 8 -------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2b23477..9583a43 100644 --- a/README.md +++ b/README.md @@ -39,12 +39,18 @@ If you are not using any package manager, download the [tarball](https://github. ### Disable Folding -Add the following line to your `.vimrc` to disable folding. +Add the following line to your `.vimrc` to disable folding configuration. ```vim let g:vim_markdown_folding_disabled=1 ``` +This option only controls vim_markdown's folding configuration. To enable/disable folding use Vim's folding configuration. + +```vim +set [no]foldenable +``` + ### Set Initial Foldlevel Add the following line to your `.vimrc` to set the initial foldlevel. This option defaults to 0 (i.e. all folds are closed) and is ignored if folding is disabled. diff --git a/after/ftplugin/mkd.vim b/after/ftplugin/mkd.vim index 6026ae8..24ee713 100644 --- a/after/ftplugin/mkd.vim +++ b/after/ftplugin/mkd.vim @@ -45,12 +45,4 @@ if !get(g:, "vim_markdown_folding_disabled", 0) let g:vim_markdown_initial_foldlevel=0 endif let &l:foldlevel=g:vim_markdown_initial_foldlevel - - "---------- everything after this is optional ----------------------- - " change the following fold options to your liking - " see ':help fold-options' for more - setlocal foldenable - setlocal foldcolumn=0 - set foldmethod=expr - set foldopen-=search endif -- 2.39.2