Friday, December 2, 2011

Re: How to fold by expression using a function?

On Dec 2, 11:17 am, wolfv <wolfvo...@gmail.com> wrote:
> Ben,
> I followed your suggestions (not sure if I understand it all).  But I
> still get the "E490: No fold found" message.  Here is what I did:
> Moved the markdown.vim file from ftplugin folder to the indent folder.
> Added these lines to top of markdown.vim file:
>         setlocal foldmethod=expr
>         setlocal foldexpr=Foldexpr_markdown(v:lnum)
> I saved the files and then reopened test_fold.txt file, but got "E490:
> No fold found" message when zc from lines starting with "#":
>         ## test level 2
> Thank you for your help.
> wolfv
>

OOPS!

Somehow I had your post confused with another. I had indent in my
head, not folding.

IGORE MY PREVIOUS ADVICE about the indent folder. You want the
filetype folder after all.

Still:

1. What's the output of:

:verbose set filetype? foldexpr? foldmethod?

2. Try setting 'foldcolumn' to some value bigger than 2. Are there any
other folds defined in the file?

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