On Thu, Oct 8, 2009 at 5:44 PM, Brett Stahlman wrote:
> None of the lines start with `contains'. The lines were broken
> automatically. The simplest way to test would be to paste it into a
> file (e.g., /tmp/todo_syntax.vim) and source the file from within the
> file containing your TODO items. E.g.,
>
> :so /tmp/todo_syntax.vim
>
> Here's the same script with backslashes continuing the long lines to
> prevent their being broken:
>
> 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
>Yes. That gets the job done. However, the way it currently folds I lose track of the dates. So I want to modify the file structure accordingly in a way that will allow me to see the date lines as well. The structure I have in mind is: date1: -> asdsd -> aaaa date2: ->11211231 ->erewrer fdsfdsf etc. date can be in format of, DD or DD/MM or DD/MM/YYYY Could you please be kind enough to suggest the syntax to make such folding possible? Thank you very much! Yosi --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
