]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Added option to disable folding
authorJeremy Mack <jeremy@pileofturtles.com>
Sat, 15 Dec 2012 15:57:28 +0000 (10:57 -0500)
committerJeremy Mack <jeremy@pileofturtles.com>
Sat, 15 Dec 2012 15:58:52 +0000 (10:58 -0500)
Also updated the readme with information about the command.

README.md
after/ftplugin/mkd.vim

index a11299bc9e8bb94b8d3ff5b7b1b0591bdad6b3f8..2d7e587ea9f8550bf6c6a73e2ec8d9af027169e5 100644 (file)
--- a/README.md
+++ b/README.md
@@ -16,6 +16,16 @@ To install without Pathogen, download the [tarball](https://github.com/plasticbo
 
 [Homepage](http://plasticboy.com/markdown-vim-mode/)
 
 
 [Homepage](http://plasticboy.com/markdown-vim-mode/)
 
+## Options
+
+**Disable Folding**
+
+Add the following line to your `.vimrc` to disable folding.
+
+```vim
+let g:vim_markdown_folding_disabled=1
+```
+
 ## License
 
 The MIT License (MIT)
 ## License
 
 The MIT License (MIT)
index b0b09467e2fc3b3541a37b9f459636dc1127a7fa..ed78895f5cedb9a6f2add4566e86eb5960cc98b6 100644 (file)
@@ -35,14 +35,17 @@ func! Foldexpr_markdown(lnum)
     endif
 endfunc
 
     endif
 endfunc
 
-setlocal foldexpr=Foldexpr_markdown(v:lnum)
-setlocal foldmethod=expr
 
 
-"---------- everything after this is optional -----------------------
-" change the following fold options to your liking
-" see ':help fold-options' for more
-setlocal foldenable
-setlocal foldlevel=0
-setlocal foldcolumn=0
-set foldmethod=expr
-set foldopen-=search
+if !exists("g:vim_markdown_folding_disabled")
+  setlocal foldexpr=Foldexpr_markdown(v:lnum)
+  setlocal foldmethod=expr
+
+  "---------- everything after this is optional -----------------------
+  " change the following fold options to your liking
+  " see ':help fold-options' for more
+  setlocal foldenable
+  setlocal foldlevel=0
+  setlocal foldcolumn=0
+  set foldmethod=expr
+  set foldopen-=search
+endif