On 19 фев, 00:28, Brett Stahlman <[email protected]> wrote:
> > Unfortunatly It doesn't work:
>
> How about something like this?
> :syntax region level1 start=/^![^!]\+.*/ end=/^![^!]\+.*/me=s-1 fold
> contains=level2
> :syntax region level2 start=/^!![^!]\+.*/ end=/^!!\?[^!]\+.*/me=s-1
> fold contained
>
> It works for me, but doesn't exclude the newlines leading up to the
> next level. I don't have time right now to determine why the original
> version with the \n\+\ze doesn't work properly. Perhaps I'll be able
> to look at it tonight if no one else has answered...

Thanks a lot -- it works like a charm!
Could you point me where I can read about "me=s-1"? Is it kind of
"offset" in :h search-offset?

PS:
By the way, if I remove contains and contained -- it still works.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to