-
Notifications
You must be signed in to change notification settings - Fork 15
/
orgagenda.sublime-syntax
165 lines (136 loc) · 4.67 KB
/
orgagenda.sublime-syntax
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
name: orgagenda
file_extensions:
- orgagenda
scope: source.orgagenda
version: 2
hidden: true
contexts:
main:
# filename and line location
- match: '(^[a-zA-Z0-9_]+:)'
scope: string.quoted orgagenda.filename
- match: '[0-9]+:[0-9]+(\.)+ (\-)+'
scope: comment orgagenda.timeseparator
- match: '(D:@)\d+-\d+-\d+'
scope: region.yellowish orgmode.deadline.warning
captures:
1: comment orgmode.preamble
- match: '(D: )Overdue'
scope: region.redish orgmode.deadline.overdue
captures:
1: comment orgmode.preamble
- match: '(D: )Due Today'
scope: region.greenish orgmode.deadline.due
captures:
1: comment orgmode.preamble
- match: 'H\['
push:
- meta_scope: orgmode.preamble orgagenda.habit
- match: '[*]'
scope: orgagenda.habit.didit
- match: '[.]'
scope: orgagenda.habit.scheduled
- match: '[_]'
scope: orgagenda.habit.nothing
- match: '\]'
pop: true
# Today in week view
- match: '^(#)([A-Za-z]+ *[0-9]+)'
scope: orgagenda.week.today
captures:
1: orgmode.preamble orgagenda.week.nothing
2: keyword orgagenda.week.today
# Active day in week view
- match: '^(&)([A-Za-z]+ *[0-9]+)'
scope: orgagenda.week.active
captures:
1: orgmode.preamble orgagenda.week.nothing
2: string.quoted orgagenda.week.active
# Both day in week view
- match: '^(@)([A-Za-z]+ *[0-9]+)'
scope: orgagenda.week.activetoday
captures:
1: orgmode.preamble orgagenda.week.nothing
2: constant.numeric orgagenda.week.activetoday
- match: 'W\['
push:
- meta_scope: orgmode.preamble orgagenda.week
- match: '[a-zA-Z0-9 ]'
scope: variable.parameter orgagenda.week.normal
- match: '[.]'
scope: orgagenda.week.empty
- match: '[_]'
scope: orgmode.preamble orgagenda.week.nothing
- match: '\]'
pop: true
- match: '((Su)|(Mo)|(Tu)|(We)|(Th)|(Fr)|(Sa)) '
scope: orgagenda.header
captures:
2: constant.numeric orgagenda.weekendheader
3: keyword orgagenda.dateheader
4: keyword orgagenda.dateheader
5: keyword orgagenda.dateheader
6: keyword orgagenda.dateheader
7: keyword orgagenda.dateheader
8: constant.numeric orgagenda.weekendheader
- match: '^[a-zA-Z][^=>:]+$'
scope: keyword orgagenda.header
# Datetime
- match: '(\d{4,4}-\d{2,2}-\d{2,2} \d{2,2}:\d{2,2}:\d{2,2})'
scope: markup.italic orgagenda.datetime
- match: '^\s*now =>.*'
scope: variable.parameter orgagenda.now
- match: '(DONE)'
scope: orgmode.state.done orgagenda.done
- match: '(TODO)'
scope: orgmode.state.todo orgagenda.todo
- match: '(DOING)'
scope: orgmode.state.doing orgagenda.doing
- match: '(BLOCKED)'
scope: orgmode.state.blocked orgagenda.blocked
- match: '(WAITING)'
scope: orgmode.state.waiting orgagenda.waiting
- match: '(CANCELLED)'
scope: orgmode.state.cancelled orgagenda.cancelled
- match: '(IN-PROGRESS)'
scope: orgmode.state.inprogress orgagenda.inprogress
- match: '(CLEANUP)'
scope: orgmode.state.cleanup orgagenda.cleanup
- match: '(FIXED)'
scope: orgmode.state.fixed orgagenda.fixed
- match: '(FLAG)'
scope: orgmode.state.flag orgagenda.flag
- match: '(NEXT)'
scope: orgmode.state.next orgagenda.next
- match: '\s+-------\s+.*'
scope: comment orgagenda.projecttitle
- match: '^=====+'
scope: comment orgagenda.blockseparator
- match: '(January|February|March|April|May|June|July|August|September|October|November|December)\s*([0-9]+)'
scope: constant.numeric orgagenda.monthheader
- match: 'B\['
scope: orgmode.preamble orgagenda.week.nothing
push:
- meta_scope: orgagenda.block
- match: '[\$]'
scope: keyword orgagenda.block.1
- match: '[\@]'
scope: constant.numeric orgagenda.block.2
- match: '[!]'
scope: string orgagenda.block.3
- match: '[#]'
scope: variable.parameter orgagenda.block.4
- match: '[%]'
scope: entity.name.class orgagenda.block.5
- match: '[\^]'
scope: entity.name.function orgagenda.block.6
- match: '[&]'
scope: source orgagenda.block.7
- match: '\]'
scope: orgmode.preamble orgagenda.week.nothing
pop: true
- match: '^== \[.*\] ==$'
scope: keyword orgagenda.header orgagenda.projecttitle