I am reposting this because the previous post did not format as expected. Sorry about the spam.
Thanks Christian. Those fixes stopped Vim from complaining on startup. But now I get a "E490: No fold found" message. What did I do wrong? I saved the Foldexpr_markdown function in: C:\Program Files (x86)\Vim \vimfiles\ftplugin\markdown.vimIs that the right location? I changed the _vimrc lines to: set foldmethod=expr set foldexpr=Foldexpr_markdown(v:lnum)also tried "setlocal" in _vimrc: setlocal foldmethod=expr setlocal foldexpr=Foldexpr_markdown(v:lnum)but either way, I got "E490: No fold found" message when zc from lines starting with "#": ## test level 2 Thank you. On Dec 2, 2:02 am, "Christian Brabandt" <cbli...@256bit.org> wrote: > On Fri, December 2, 2011 9:57 am, wolfv wrote: > > How to fold by expression using the Foldexpr_markdown function posted > > onhttps://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