Friday, December 2, 2011

How to fold by expression using a function?

How to fold by expression using the Foldexpr_markdown function posted
on https://gist.github.com/1038710 ?

I am running Vim 7.3.46 and do not have vim-voom installed.

I added the following lines to my _vimrc file:
set foldmethod=expr
:so C:\Program Files (x86)\Vim\vimfiles\ftplugin\markdown.vim
:call Foldexpr_markdown(lnum)
but got this message on starting Vim:
Error detected while processing C:\Program Files (x86)\Vim\_vimrc:
line 41:
E121: Undefined variable: lnum
E116: Invalid arguments for function Foldexpr_markdown

Thank you.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: