From: Bart Bakker Date: Fri, 3 Oct 2014 14:44:34 +0000 (+0200) Subject: Respect Vim's global fold config X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/0c61f835a73119eb80e68d27cf95136c36aa092b?ds=sidebyside;hp=--cc Respect Vim's global fold config Deleted overriding global fold configuration for markdown buffers and improved README on purpose of vim_markdown_folding_disabled. --- 0c61f835a73119eb80e68d27cf95136c36aa092b 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