Implemented syntax highlighting with preferred groups

This commit is contained in:
Leandro Freitas
2011-05-31 13:11:58 -03:00
parent dcba4cbfdf
commit 0c110aeda0

View File

@@ -9,36 +9,38 @@ if exists("b:current_syntax")
finish finish
endif endif
syntax match TodoComplete '^[xX].*$' syntax match TodoDone '^[xX]\s.*$'
syntax match TodoNoPriotity '^[^(xX].*$' syntax match TodoPriorityA '^([aA])\s.*$'
syntax match TodoPriorityA '^([aA]).*$' syntax match TodoPriorityB '^([bB])\s.*$'
syntax match TodoPriorityB '^([bB]).*$' syntax match TodoPriorityC '^([cC])\s.*$'
syntax match TodoPriorityC '^([cC]).*$' syntax match TodoPriorityD '^([dD])\s.*$'
syntax match TodoPriorityD '^([dD]).*$' syntax match TodoPriorityE '^([eE])\s.*$'
syntax match TodoPriorityE '^([eE]).*$' syntax match TodoPriorityF '^([fF])\s.*$'
syntax match TodoPriorityF '^([fF]).*$' syntax match TodoPriorityG '^([gG])\s.*$'
syntax match TodoPriorityG '^([gG]).*$' syntax match TodoPriorityH '^([hH])\s.*$'
syntax match TodoPriorityH '^([hH]).*$' syntax match TodoPriorityI '^([iI])\s.*$'
syntax match TodoPriorityI '^([iI]).*$' syntax match TodoPriorityJ '^([jJ])\s.*$'
syntax match TodoPriorityJ '^([jJ]).*$' syntax match TodoPriorityK '^([kK])\s.*$'
syntax match TodoPriorityK '^([kK]).*$' syntax match TodoPriorityL '^([lL])\s.*$'
syntax match TodoPriorityL '^([lL]).*$' syntax match TodoPriorityM '^([mM])\s.*$'
syntax match TodoPriorityM '^([mM]).*$' syntax match TodoPriorityN '^([nN])\s.*$'
syntax match TodoPriorityN '^([nN]).*$' syntax match TodoPriorityO '^([oO])\s.*$'
syntax match TodoPriorityO '^([oO]).*$' syntax match TodoPriorityP '^([pP])\s.*$'
syntax match TodoPriorityP '^([pP]).*$' syntax match TodoPriorityQ '^([qQ])\s.*$'
syntax match TodoPriorityQ '^([qQ]).*$' syntax match TodoPriorityR '^([rR])\s.*$'
syntax match TodoPriorityR '^([rR]).*$' syntax match TodoPriorityS '^([sS])\s.*$'
syntax match TodoPriorityS '^([sS]).*$' syntax match TodoPriorityT '^([tT])\s.*$'
syntax match TodoPriorityT '^([tT]).*$' syntax match TodoPriorityU '^([uU])\s.*$'
syntax match TodoPriorityU '^([uU]).*$' syntax match TodoPriorityV '^([vV])\s.*$'
syntax match TodoPriorityV '^([vV]).*$' syntax match TodoPriorityW '^([wW])\s.*$'
syntax match TodoPriorityW '^([wW]).*$' syntax match TodoPriorityX '^([xX])\s.*$'
syntax match TodoPriorityX '^([xX]).*$' syntax match TodoPriorityY '^([yY])\s.*$'
syntax match TodoPriorityY '^([yY]).*$' syntax match TodoPriorityZ '^([zZ])\s.*$'
syntax match TodoPriorityZ '^([zZ]).*$'
highlight default TodoPriorityA guifg=Red ctermfg=Red " Other priority colours might be defined by the user
" TODO highlight default link TodoDone Comment
highlight default link TodoPriorityA Constant
highlight default link TodoPriorityB Statement
highlight default link TodoPriorityC Identifier
let b:current_syntax = "todo.txt" let b:current_syntax = "todo.txt"