On Apr 17, 6:44 pm, howard Schwartz <howard...@gmail.com> wrote:
> Im not sure if this idea might help, but I faced a similar problem in folding
> blocks of text within email digests like that for vim_use. And I did not have
> the stomach for fancy, script-based folding strategies. So I discovered
> something simple. Here is a fold for blocks of text that appear within vim_use
> digests:
>
> 1s/^.*$/Topic: ^M&/
>         g/^Topic: */,/^Topic: *\|\%$/-1fold

I don't know what to make of this. For one thing I can't type it
without "trailing characters" errors. Is it all one line? Is it an ex
command? I tried inserting the ^M's with ctrl-q-ctrl-m but it
immediately terminated the command.

> Each fold gets applied to a block that starts with Topic: and ends with the
> line just before the next occurrence of Topic:  This is similar to your
> sections.
>
> For the last fold, it ends at the file's last line, %$. I then insert a line
> with Topic:, as the file's first line to ensure all blocks have a beginning
> and end. Very simple, but works like a charm. However, sounds like you want
> fold to happen dynamically as you type and edit?

The syn region's that I used do get applied as you type, which is very
nice, but perhaps if I understood your command that could help me
discover a solution.

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

Reply via email to