On Thu, May 07, 2009 at 05:54:05AM -0700, Ben Fritz wrote: > > > > On May 7, 4:21 am, "Wu, Yue" <[email protected]> wrote: > > == Header 2 == > > Text of header 2. > > * List 1 of header 2 > > Text 3 > > * List 2 of header 2 > > Text 4 > > > > How to do determination on the fold level of List 1 of header 1, List 1 of > > header 2 > > and other. > > > > Check :help fold-expr and think about it a little. > > The link that John posted shows you one way to get the headings > folded. > > :help fold-expr gives return values that can increase/decrease the > fold level. You may be able to just add something to the folding ideas > in the tip mentioned to return these values for list items.
It's easy to set the list 1 to one foldlevel which is increased/decreased from the previous's line's foldlevel, but it's hard to do it with the list 2, I don't know how to let vim know it's a list 2, so shared with the same foldlevel of list 1, it seems vim can't know the context when evaluing the foldlevel, I try to find the previous's list's and header's line number, and do stuff with it, but failed. -- Hi, Wu, Yue --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
