Friday, December 2, 2011

Re: How to fold by expression using a function?

Ben,

Problem solved. Folding worked after I added this source statement to
the end of my _vimrc file: so C:\Program Files (x86)\Vim\vimfiles
\ftplugin\markdown.vim
Thank you for your help.

On Dec 2, 12:55 pm, Ben Fritz <fritzophre...@gmail.com> wrote:
> On Dec 2, 1:52 pm, Ben Fritz <fritzophre...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> > 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?
>
> Also, is the script you created in the ftplugin directory being
> sourced at all? Take a look at :scriptnames to make sure it's there.
>
> I can't believe my indent confusion...sorry about that. How
> embarrassing!

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

Post a Comment