From dc6a030ff10c7ae8b67f749447c4cb643513e150 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 11 Apr 2013 12:22:21 +0200 Subject: [Syntax] todo ! --- syntax/todo.vim | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 syntax/todo.vim diff --git a/syntax/todo.vim b/syntax/todo.vim new file mode 100644 index 0000000..2b8c4d7 --- /dev/null +++ b/syntax/todo.vim @@ -0,0 +1,34 @@ +" 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 + +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 + +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 + +let b:current_syntax="todo" -- cgit v1.2.3