montionoimi
montionoimi

Reputation: 1

.jsf (JOE editor) highlighting for todo.txt syntax

I can't get the JOE editor to highlight tags like due:YYYY-MM-TT for due dates or rec:NP for recurrences to work; I was able to highlight prioritized tasks though.

A sample todo.txt looks like this:

update the ad with Sara
(B) ask Richard about stuff
send questions to Mr K next week
(B) ask T about integration for A
(A) test 1110 due:2024-12-09 rec:1d
test 1120 due:2024-12-09 rec:1w and tell S

How would I highlight individual tags/words within a line?

I'm trying to highlight the prioritized tasks and the tags with this todotxt.jsf:

# Todo.txt syntax highlighting for JOE

=Idle
=Prio    CYAN    bold
=Due    bg_MAGENTA
=Rec    bg_YELLOW

:lineStart Idle
  *    idle    buffer
  "("    prio    noeat    buffer

:idle Idle
  *    idle    buffer
  " :"    tagwordsIdle    hold
  "\n"    lineStart

:prio Prio
  *    prio    buffer
  " :"    tagwordsPrio    hold
  "\n"    lineStart

:tagwordsIdle Idle
  *    idle
  "\n"    lineStart    strings
  "due"    dueIdle    recolor=-2
  #"rec"    recIdle
done

:tagwordsPrio Prio
  *    prio
  "\n"    lineStart    strings
  "due"    duePrio    recolor=-2
  #"rec"    recPrio
done

:dueIdle Due
  *    dueIdle
  " \t"    idle

:duePrio Due
  *    duePrio
  " \t"    prio

It highlights the priorities – (A) and (B) – but not the tags due: and rec:. What can I do?

Upvotes: 0

Views: 16

Answers (0)

Related Questions