]> git.sev.monster Git - dotfiles.git/blame - .vim/syntax/todo.vim
initial commit
[dotfiles.git] / .vim / syntax / todo.vim
CommitLineData
189288f7 1" File: todo.txt.vim
2" Description: Todo.txt syntax settings
3" Author: Leandro Freitas <freitass@gmail.com>
4" License: Vim license
5" Website: http://github.com/freitass/todo.txt-vim
6" Version: 0.3
7
8if exists("b:current_syntax")
9 finish
10endif
11
12syntax match TodoDone '^[xX]\s.\+$'
13syntax match TodoPriorityA '^([aA])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
14syntax match TodoPriorityB '^([bB])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
15syntax match TodoPriorityC '^([cC])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
16syntax match TodoPriorityD '^([dD])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
17syntax match TodoPriorityE '^([eE])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
18syntax match TodoPriorityF '^([fF])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
19syntax match TodoPriorityG '^([gG])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
20syntax match TodoPriorityH '^([hH])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
21syntax match TodoPriorityI '^([iI])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
22syntax match TodoPriorityJ '^([jJ])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
23syntax match TodoPriorityK '^([kK])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
24syntax match TodoPriorityL '^([lL])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
25syntax match TodoPriorityM '^([mM])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
26syntax match TodoPriorityN '^([nN])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
27syntax match TodoPriorityO '^([oO])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
28syntax match TodoPriorityP '^([pP])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
29syntax match TodoPriorityQ '^([qQ])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
30syntax match TodoPriorityR '^([rR])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
31syntax match TodoPriorityS '^([sS])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
32syntax match TodoPriorityT '^([tT])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
33syntax match TodoPriorityU '^([uU])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
34syntax match TodoPriorityV '^([vV])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
35syntax match TodoPriorityW '^([wW])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
36syntax match TodoPriorityX '^([xX])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
37syntax match TodoPriorityY '^([yY])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
38syntax match TodoPriorityZ '^([zZ])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
39
40syntax match TodoDate '\d\{2,4\}-\d\{2\}-\d\{2\}' contains=NONE
41syntax match TodoProject '\(^\|\W\)+[^[:blank:]]\+' contains=NONE
42syntax match TodoContext '\(^\|\W\)@[^[:blank:]]\+' contains=NONE
43
44" Other priority colours might be defined by the user
45highlight default link TodoDone Comment
46highlight default link TodoPriorityA Constant
47highlight default link TodoPriorityB Statement
48highlight default link TodoPriorityC Identifier
49highlight default link TodoDate PreProc
50highlight default link TodoProject Special
51highlight default link TodoContext Special
52
53if exists('g:todo_load_python') && g:todo_load_python
54 if has('python')
55 let b:curdir = expand('<sfile>:p:h')
56 let s:script_dir = b:curdir . "/python/"
57 execute "pyfile " . s:script_dir. "todo.py"
58 elseif has('python3')
59 let b:curdir = expand('<sfile>:p:h')
60 let s:script_dir = b:curdir . "/python/"
61 execute "py3file " . s:script_dir. "todo.py"
62 else
63 echom "Your version of vim has no python support. Overdue dates won't be highlighted"
64 endif
65endif
66
67let b:current_syntax = "todo"
This page took 0.076901 seconds and 4 git commands to generate.