diff options
| author | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2013-04-25 16:55:57 +0200 | 
|---|---|---|
| committer | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2013-04-25 16:55:57 +0200 | 
| commit | 97844fe2726cb341d23fef2f2989e0f3622fe549 (patch) | |
| tree | 4f2ba1ac3214059eac2249c0dbb4b057dd010e80 /syntax | |
| parent | 40e5244c67c7a99efa2569fd6861423510609fc6 (diff) | |
[Syntax] todo: updated
- improved Done tasks, with matching of every siblings
Diffstat (limited to 'syntax')
| -rw-r--r-- | syntax/todo.vim | 40 | 
1 files changed, 22 insertions, 18 deletions
| diff --git a/syntax/todo.vim b/syntax/todo.vim index 2b8c4d7..1902d42 100644 --- a/syntax/todo.vim +++ b/syntax/todo.vim @@ -11,24 +11,28 @@ endif  setlocal iskeyword+=-  syntax case ignore -syntax region todoTitle    start="^\(\w\|=\).*"  end="$"me=s-1 -syntax region todoTask0    start="^\s*[\*]"  end="$"me=s-1 contains=todoInfo,todoTodo -syntax region todoTask1    start="^\s*[+]" end="$"me=s-1   contains=todoInfo,todoTodo -syntax region todoTask2    start="^\s*[→]" end="$"me=s-1   contains=todoInfo,todoTodo -syntax region todoTask3    start="^\s*[_]" end="$"me=s-1   contains=todoInfo,todoTodo -syntax region todoDone     start="^[-]" end="$"me=s-1      contains=todoInfo,todoTodo -syntax region todoTaskDone start="^\s\+[-]" end="$"me=s-1  contains=todoInfo,todoTodo -syntax region todoTodo     start="(" end=")"               contained -syntax region todoInfo     start="\[" end="\]"             contained +syn match  Todo      /([^)]*)/                    containedin=ALLBUT,todoDone,todoTaskDone +syn match  String    /\[[^\]]*\]/                 containedin=ALL -highlight      todoTitle    cterm=bold -highlight link todoTask0    Title -highlight link todoTask1    Directory -highlight link todoTask2    Constant -highlight link todoTask3    Normal -highlight link todoDone     DiffAdd -highlight link todoTaskDone DiffDelete -highlight link todoTodo     Todo -highlight link todoInfo     String +syn region todoTitle     start=/^\z\(\s*\)\*/ end=/$/ +syn region todoTask1     start=/^\z\(\s*\)+/  end=/$/ +syn region todoTask2     start=/^\z\(\s*\)→/  end=/$/ +syn region todoTask3     start=/^\z\(\s*\):/  end=/$/ +syn region todoDone      start=/^-/  end=/^\(\S\|$\)/me=s-1 contains=todoTaskDone +syn region todoTaskDone  start=/^\z\(\s\+\)-/ skip=/^\z1\s\+/ end=/^/me=s-1 + +syn match  rtTicket /\#\d\+/                     containedin=ALLBUT,todoDone,todoTaskDone + +syn region Comment start=/^\%^\|=/ end=/=$/ + +hi link todoTitle Title +hi link todoTask1 DiffText +hi link todoTask2 Number +hi link todoTask3 Statement + +hi link rtTicket SpellRare + +hi link todoDone     NonText +hi link todoTaskDone NonText  let b:current_syntax="todo" | 
