From: Hiroshi Shirosaki Date: Wed, 1 Feb 2017 05:41:12 +0000 (+0900) Subject: Merge pull request #297 from KainokiKaede/master X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/2f1103bcc483bc52c733d40fa55f6b03f79d3847?hp=297ab45e4f0e1fa1f131e13531e18bf6a5231ded Merge pull request #297 from KainokiKaede/master Fix the matching region of mkdListItem. --- diff --git a/.travis.yml b/.travis.yml index a913cd7..ab79fcd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ before_script: | export PATH="/usr/local/bin:$PATH" cd "$TRAVIS_BUILD_DIR" fi - sudo pip install virtualenv + sudo -H pip install virtualenv stty cols 80 script: diff --git a/README.md b/README.md index 9c6665e..f5cbaf9 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,12 @@ let g:vim_markdown_folding_style_pythonic = 1 Level 1 heading which is served as a document title is not folded. `g:vim_markdown_folding_level` setting is not active with this fold style. +To prevent foldtext from being set add the following to your `.vimrc`: + +```vim +let g:vim_markdown_override_foldtext = 0 +``` + ### Set header folding level Folding level is a number between 1 and 6. By default, if not specified, it is set to 1. diff --git a/after/ftplugin/markdown.vim b/after/ftplugin/markdown.vim index 6265db3..cdf0a26 100644 --- a/after/ftplugin/markdown.vim +++ b/after/ftplugin/markdown.vim @@ -150,7 +150,7 @@ let s:vim_markdown_folding_level = get(g:, "vim_markdown_folding_level", 1) if !get(g:, "vim_markdown_folding_disabled", 0) setlocal foldexpr=Foldexpr_markdown(v:lnum) setlocal foldmethod=expr - if get(g:, "vim_markdown_folding_style_pythonic", 0) + if get(g:, "vim_markdown_folding_style_pythonic", 0) && get(g:, "vim_markdown_override_foldtext", 1) setlocal foldtext=Foldtext_markdown() endif endif diff --git a/doc/vim-markdown.txt b/doc/vim-markdown.txt index eb61653..339fdaf 100644 --- a/doc/vim-markdown.txt +++ b/doc/vim-markdown.txt @@ -96,6 +96,10 @@ To fold in a style like python-mode [6], add the following to your '.vimrc': Level 1 heading which is served as a document title is not folded. 'g:vim_markdown_folding_level' setting is not active with this fold style. +To prevent foldtext from being overridden, add the following to your '.vimrc': + + let g:vim_markdown_override_foldtext = 0 + ------------------------------------------------------------------------------- *vim-markdown-set-header-folding-level* Set header folding level ~