summaryrefslogtreecommitdiff
path: root/syntax/todo.vim
blob: 1902d421c25f34735bda18fbaa82a7e0714aebd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
" Vim syntax file
" © Hugues HIEGEL 2013 (hugues@hiegel.fr)
" Licensed under CC BY/NC/SA
"
" Version 0

if exists("b:current_syntax")
	finish
endif

setlocal iskeyword+=-
syntax case ignore

syn match  Todo      /([^)]*)/                    containedin=ALLBUT,todoDone,todoTaskDone
syn match  String    /\[[^\]]*\]/                 containedin=ALL

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"