Friday, December 2, 2011

Re: How to fold by expression using a function?

On Fri, December 2, 2011 9:57 am, wolfv wrote:
> 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)

You need to use v:lnum and not lnum and you should not call the function
manually, vim does it for you:
set foldexpr=Foldexpr_markdown(v:lnum)

regards,
Christian

--
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: