Newer
Older
moodlog_sublime / moodlog.sublime-syntax
root on 7 May 2019 1 KB Initial commit
  1. %YAML 1.2
  2. ---
  3. # http://www.sublimetext.com/docs/3/syntax.html
  4. name: moodlogtxt
  5. file_extensions:
  6. - moodlog.txt
  7. scope: text.moodlogtxt
  8. variables:
  9. date: ([1-2]\d{3}[-/\\.](0?[1-9]|1[012])[-/\\.](0[1-9]|[12]\d|3[01]))
  10. time: (?:\s([0-9]|0[0-9]|1[0-9]|2[0-3])\:[0-5][0-9])
  11. yellow: hsl(54, 100%, 50%)
  12. contexts:
  13. main:
  14. - match: '{{time}}{1,2}'
  15. comment: moodlog time
  16. scope: constant.numeric.moodlogtxt.time
  17.  
  18. - match: (^\[\S+)|(\s\[\S+)
  19. comment: Todo item project
  20. scope: string.unquoted.scheduler.config
  21.  
  22. - match: (^\@\S+)|(\s\@\S+)
  23. comment: moodlog positive item context
  24. scope: comment.block.moodlogtxt.context
  25.  
  26. - match: (^\+\S+)|(\s\+\S+)
  27. comment: Todo item project
  28. scope: entity.name.class.moodlogtxt.project
  29.  
  30. - match: (^\-\S+)|(\s\-\S+)
  31. comment: Todo item project
  32. scope: entity.name.tag.moodlogtxt.context
  33.  
  34. - match: '{{date}}(?= ){1,2}'
  35. comment: Todo item done or creation date
  36. scope: constant.numeric.moodlogtxt.date
  37.  
  38. - match: '(?:[^x])((?!\s([@\+\-])|({{date}})).)+'
  39. comment: Todo item text
  40. scope: entity.task.moodlogtxt
Buy Me A Coffee