On Thu, Oct 8, 2009 at 4:33 PM, Christian Brabandt wrote:
>
> On Thu, October 8, 2009 3:31 pm, yosi izaq 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:
>
> Well, I have never used fold-expressions. But that may give you a start:
> set
> foldexpr=(indent(v:lnum)==0)?'=':(indent(v:lnum-1)>indent(v:lnum)?'<1':'>1')
>
That didn't do much. I have created a dummy file in the format I
described. I use it for testing the different fold methods.
10x,
Yosi
For reference - Dummy ToDo list file:
1
-> item1
line 1
line 1
line 1
line 1
line 1
line 1
line 1
line 1
line 1
line 1
line 1
--> item 11
dsflkdsflkdsf
dsflkdsflkdsf
dsflkdsflkdsf
dsflkdsflkdsf
dsflkdsflkdsf
dsflkdsflkdsf
--> item 12
dsffsdfdsf
---> item 121
2
-> item3
1232423432
1232423432
1232423432
1232423432
1232423432
1232423432
1232423432
-> item4
3
-> item 5
lfkgfdlgkfdg
lfdg;fldkgfd;lk
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---