|
From: Eric B. <el...@gm...> - 2015-10-29 18:32:16
|
I'm creating a mode file for todotxt ( https://github.com/ginatrapani/todo.txt-cli/wiki/The-Todo.txt-Format). I've got every feature implemented except for the date-created feature. More specifically, when date-created and priority are combined the date must come after the priority. Ex. (A) 2011-03-02 Call Mom (B) Call Mom 2011-03-02 In the example (A) and (B) are the priority, and (A) has a date-created while (B) does not. What I want to do is have the priority be one color LITERAL1, and the date-created be KEYWORD4. I can't seem to get 2 different TYPEs into a single or delegated rule. I've tried doing a SEQ_REGEX with a DELEGATE attribute: <SEQ_REGEXP TYPE="LITERAL1" AT_LINE_START="TRUE" DELEGATE="DATE_FLOATING">\([AEIMQUY]\)\s\d{4}-\d{2}-\d{2}</SEQ_REGEXP> <RULES SET="DATE_FLOATING"> <SEQ_REGEXP TYPE="KEYWORD4">\d{4}-\d{2}-\d{2}</SEQ_REGEXP> </RULES> I've also tried a few incarnations of a EOL_SPAN_REGEXP, and SPAN_REGEXP. It doesn't look like it's possible because anything that matches the REGEXP doesn't get highlighted through the DELEGATE. I might just punt and highlight all date's, but I was hoping I could highlight date-created dates as specified in the docs specifically. Any help here would be greatly appreciated. Thanks, Eric B -- Learn from the past. Live in the present. Work towards the future. Blog: http://eric-berry.blogspot.com jEdit <http://www.jedit.org> - Programmer's Text Editor |