From fc6e3185c9a90bea6521a595e01d173ae5c677bc Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Fri, 17 Aug 2018 09:22:52 +0200 Subject: [PATCH] Fixed highlighting indented items, fixed cancelled and removed unneeded operators --- .vim/syntax/todo.vim | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/.vim/syntax/todo.vim b/.vim/syntax/todo.vim index 9eb2d99..610f95c 100644 --- a/.vim/syntax/todo.vim +++ b/.vim/syntax/todo.vim @@ -43,50 +43,41 @@ syntax region scratchThis start=/\v --/ skip=/\v\\./ end=/\v--\ / oneline highlight scratchThis ctermfg=Grey guifg=#666666 -" Generic operators -syntax match todoOperator "\v\*" -syntax match todoOperator "\v/" -syntax match todoOperator "\v\+" -syntax match todoOperator "\v-" - -highlight link todoOperator Operator - - " Task statuses syntax match todoNote "\v^n .*$" nextgroup=todoNote -syntax match todoNote "\v .*n .*$" nextgroup=todoNote -syntax match todoNote "\v .*$" nextgroup=todoNote +syntax match todoNote "\v^\s{-}n .*$" nextgroup=todoNote +syntax match todoNote "\v^ .*$" nextgroup=todoNote highlight todoNote ctermfg=Grey guifg=#666666 syntax match todoStatusDone "\v^v " nextgroup=todoItem skipwhite -syntax match todoStatusDone "\v .*v " nextgroup=todoItem skipwhite +syntax match todoStatusDone "\v^\s{-}v " nextgroup=todoItem skipwhite highlight todoStatusDone ctermfg=green guifg=#00ff00 -syntax match todoStatusCancelled "\v^x " nextgroup=todoItem skipwhite -syntax match todoStatusCancelled "\v .*x " nextgroup=todoItem skipwhite -highlight todoStatusCancelled ctermfg=DarkGreen +syntax match todoStatusCancelled "\v^x .*$" nextgroup=todoItem skipwhite +syntax match todoStatusCancelled "\v^\s{-}x .*$" nextgroup=todoItem skipwhite +highlight todoStatusCancelled ctermfg=DarkGreen guifg=#005f00 syntax match todoStatusDoing "\v^d .*$" nextgroup=todoItem skipwhite -syntax match todoStatusDoing "\v d .*$" nextgroup=todoItem skipwhite +syntax match todoStatusDoing "\v^\s{-}d .*$" nextgroup=todoItem skipwhite highlight todoStatusDoing ctermfg=223 guifg=#f0dfaf syntax match todoStatusTest "\v^t " nextgroup=todoItem skipwhite -syntax match todoStatusTest "\v t " nextgroup=todoItem skipwhite +syntax match todoStatusTest "\v^\s{-}t " nextgroup=todoItem skipwhite highlight todoStatusTest ctermfg=darkcyan guifg=#6666ff syntax match todoStatusTodo "\v^- " nextgroup=todoItem skipwhite -syntax match todoStatusTodo "\v .*- " nextgroup=todoItem skipwhite +syntax match todoStatusTodo "\v^\s{-}- " nextgroup=todoItem skipwhite highlight todoStatusTodo ctermfg=red guifg=#ff0000 syntax match todoStatusImportant "\v^\> .*$" nextgroup=todoItem skipwhite -syntax match todoStatusImportant "\v .*\> .*$" nextgroup=todoItem skipwhite +syntax match todoStatusImportant "\v^\s{-}\> .*$" nextgroup=todoItem skipwhite syntax match todoStatusImportant "\v^! .*$" nextgroup=todoItem skipwhite -syntax match todoStatusImportant "\v .*! .*$" nextgroup=todoItem skipwhite +syntax match todoStatusImportant "\v^\s{-}! .*$" nextgroup=todoItem skipwhite "highlight todoStatusImportant ctermfg=131 guifg=#af5f5f highlight todoStatusImportant ctermfg=167 guifg=#d75f5f syntax match todoStatusQuestion "\v^\? " nextgroup=todoItem skipwhite -syntax match todoStatusQuestion "\v \? " nextgroup=todoItem skipwhite +syntax match todoStatusQuestion "\v^\s{-}\? " nextgroup=todoItem skipwhite highlight todoStatusQuestion ctermfg=darkcyan guifg=#6666ff " Highlight matching brackets (for example a timeslot)