On Thu, Oct 8, 2009 at 4:30 PM, Brett Stahlman wrote:
>
>
>
> On Oct 8, 8:31 am, yosi izaq <[email protected]> wrote:
>> On Thu, Oct 8, 2009 at 2:27 PM, Paul  wrote:
>>
>> >> I would like to apply the most simple directive to fold all the file
>> >> so that each item (->) would be closed.
>>
>> > set foldmethod=indent ?
>>
>> Doesn't get the job done. The bullets are indented but I'm too lazy to
>> indent the text so the file looks like:
>
> Does this do what you want?
> syn region Lvl1 start=/^\s*-\{1}>/ end=/^\s*-\{1}>/me=s-1
> contains=Lvl2,Lvl3,Lvl4 fold
> syn region Lvl2 start=/^\s*-\{2}>/ end=/^\s*-\{1,2}>/me=s-1 contained
> contains=Lvl3,Lvl4 fold
> syn region Lvl3 start=/^\s*-\{3}>/ end=/^\s*-\{1,3}>/me=s-1 contained
> contains=Lvl4 fold
> syn region Lvl4 start=/^\s*-\{4}>/ end=/^\s*-\{1,4}>/me=s-1 contained
> fold
> set foldmethod=syntax
>

Sorry but I'm having trouble applying this in VIM, can I copy paste
this whole section to ex prompt?- Or should I add it to .vimrc?
If I go for the syntax route it must be some kind of trigger on the
fly syntax that is not associated with a file type, one that I can
trigger for the simple text files that are my ToDo list.

Oh and I just tried to copy paste each line to ex but got errors for
the lines starting with contains.

Thanks,
Yosi

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

Reply via email to