From: Ciro Santilli Date: Tue, 17 Jun 2014 12:12:42 +0000 (+0200) Subject: Merge pull request #92 from y0t4/fix_if_folding_disabled_is_0 X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/17be3cdaeaedc796fade2c3d93d31fef56a68934?hp=07237228f6dd9ac70012cbdfc7a4126cb6984946 Merge pull request #92 from y0t4/fix_if_folding_disabled_is_0 Fix folding bug if folding disabled option is 0 --- diff --git a/after/ftplugin/mkd.vim b/after/ftplugin/mkd.vim index 26ccb23..6026ae8 100644 --- a/after/ftplugin/mkd.vim +++ b/after/ftplugin/mkd.vim @@ -36,7 +36,7 @@ func! Foldexpr_markdown(lnum) endfunc -if !exists("g:vim_markdown_folding_disabled") +if !get(g:, "vim_markdown_folding_disabled", 0) setlocal foldexpr=Foldexpr_markdown(v:lnum) setlocal foldmethod=expr diff --git a/ftplugin/mkd.vim b/ftplugin/mkd.vim index 21043a6..1e48365 100644 --- a/ftplugin/mkd.vim +++ b/ftplugin/mkd.vim @@ -368,8 +368,7 @@ call MapNormVis('(Markdown_MoveToParentHeader)', 'Markdown_MoveT " Menmonic: Current call MapNormVis('(Markdown_MoveToCurHeader)', 'Markdown_MoveToCurHeader') -if ! exists('g:vim_markdown_no_default_key_mappings') -\ || !g:vim_markdown_no_default_key_mappings +if !get(g:, 'vim_markdown_no_default_key_mappings', 0) nmap ]] (Markdown_MoveToNextHeader) nmap [[ (Markdown_MoveToPreviousHeader) nmap ][ (Markdown_MoveToNextSiblingHeader)