-
Notifications
You must be signed in to change notification settings - Fork 3
/
msg.coder
409 lines (361 loc) · 40.6 KB
/
msg.coder
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
;----------------------------------------------;
; Coder plugin syntax file ;
;----------------------------------------------;
;Colors
; Color need to be in #RRGGBB or #RGB format.
; If color equal to zero, then color ignored.
;
;Font styles
; 0 ignored.
; 1 normal.
; 2 bold.
; 3 italic.
; 4 bold italic.
;
;For comfort file viewing/editing set tab size to 8.
;Saved e-mail messages and mht pages syntax file
;Author: Lenchik
;https://github.com/Lenchik/Akelpad-syntax-highlighting/blob/master/msg.coder
;Recomendations:
; None so far
;Revision 0.1 (2012-12-xx, AkelPad 4.8.0, Coder 10.4)
;first public release
;History:
; None so far
;===============
;TODO:
;folding
;regexp rules
;keywords and often used definitions
Files:
;==========
;File types
;==========
;Outlook e-mail save format
*.msg
;TheBat e-mail save format
*.eml
;Internet Explorer Web page save format
*.mht
;MHTML
*.mhtml
;Mail.ru e-mail save format
*.mim
;----------------------------------------------;
; HighLight ;
;----------------------------------------------;
;Flags (sum of the members)
; 1 case sensitive.
; 2 word is a composition of characters ("Words:" section only). Example: "0123456789" - highlight words that contain only digits.
; 4 quote end required ("Quotes:" section only).
; 8 quote start string is ignored and last meet delimiter used as quote start ("Quotes:" section only).
; 16 quote end string is ignored and first meet delimiter used as quote end ("Quotes:" section only).
; 32 don't highlight quote start ("Quotes:" section only).
; 64 don't highlight quote end ("Quotes:" section only).
; 128 don't catch and don't highlight quote start ("Quotes:" section only).
; 256 don't catch and don't highlight quote end ("Quotes:" section only).
; 512 quote start, delimiter or word located at line start.
; 1024 quote end, delimiter or word located at line end.
; 2048 quote start is surrounded with delimiters ("Quotes:" section only).
; 4096 quote end is surrounded with delimiters ("Quotes:" section only).
; 8192 quote doesn't contain delimiters ("Quotes:" section only).
; 16384 only quote start string is catched ("Quotes:" section only).
; 32768 quote doesn't contain any character ("Quotes:" section only).
Font:
;=================================================================
;FontStyle FontSize FaceName
;=================================================================
${HighLight_FontStyle} ${HighLight_FontSize} ${HighLight_FaceName}
Colors:
;=============================================================================================================================================================================================================================================================================================================================================================================================================================
;BasicTextColor BasicBkColor SelTextColor SelBkColor LineTextColor LineBkColor LineBorderColor AltTextColor AltBkColor AltBorderColor ColumnColor MarkerColor CaretColor UrlColor ActiveUrlColor VisitUrlColor
;=============================================================================================================================================================================================================================================================================================================================================================================================================================
${HighLight_BasicTextColor} ${HighLight_BasicBkColor} ${HighLight_SelTextColor} ${HighLight_SelBkColor} ${HighLight_LineTextColor} ${HighLight_LineBkColor} ${HighLight_LineBorderColor} ${HighLight_AltTextColor} ${HighLight_AltBkColor} ${HighLight_AltBorderColor} ${HighLight_ColumnColor} ${HighLight_MarkerColor} ${HighLight_CaretColor} ${HighLight_UrlColor} ${HighLight_ActiveUrlColor} ${HighLight_VisitUrlColor}
BkImage:
;==================================================
;BkImageFile BkImageAlpha
;==================================================
${HighLight_BkImageFile} ${HighLight_BkImageAlpha}
AutoMark:
;====================================================================================================================
;AutoMarkFlags AutoMarkFontStyle AutoMarkTextColor AutoMarkBkColor
;====================================================================================================================
${HighLight_AutoMarkFlags} ${HighLight_AutoMarkFontStyle} ${HighLight_AutoMarkTextColor} ${HighLight_AutoMarkBkColor}
Quotes:
;===================================================================================
;Flags Font Color Color Quote Quote Escape Quote Quote Parent Rule
; style text bkgrnd start end char include exclude ID ID
;===================================================================================
;rfc-main
;2560=2048+512+1
2561 1 ${DEL1} 0 "BCC:" "" "" "" ""
2561 1 ${DEL1} 0 "CC:" "" "" "" ""
2561 1 ${DEL1} 0 "Date:" "" "" "" ""
2561 1 ${DEL1} 0 "From:" "" "" "" ""
2561 1 ${DEL1} 0 "Organization:" "" "" "" ""
2561 1 ${DEL1} 0 "Subject:" "" "" "" ""
2561 1 ${DEL1} 0 "To:" "" "" "" ""
;additional, out of RFC
2561 1 ${DEL1} 0 "From" "" "" "" ""
;rfc
;528=512+16+1
529 1 ${OP} 0 "Comments:" "" "" "" ""
529 1 ${OP} 0 "Encrypted:" "" "" "" ""
529 1 ${OP} 0 "In-Reply-To:" "" "" "" ""
529 1 ${OP} 0 "Keywords:" "" "" "" ""
529 1 ${OP} 0 "Message-ID:" "" "" "" ""
529 1 ${OP} 0 "Received:" "" "" "" ""
529 1 ${OP} 0 "References:" "" "" "" ""
529 1 ${OP} 0 "Reply-To:" "" "" "" ""
529 1 ${OP} 0 "Resent-BCC:" "" "" "" ""
529 1 ${OP} 0 "Resent-CC:" "" "" "" ""
529 1 ${OP} 0 "Resent-Date:" "" "" "" ""
529 1 ${OP} 0 "Resent-From:" "" "" "" ""
529 1 ${OP} 0 "Resent-Message-ID:" "" "" "" ""
529 1 ${OP} 0 "Resent-Reply-To:" "" "" "" ""
529 1 ${OP} 0 "Resent-Sender:" "" "" "" ""
529 1 ${OP} 0 "Resent-To:" "" "" "" ""
529 1 ${OP} 0 "Return-Path:" "" "" "" ""
529 1 ${OP} 0 "Sender:" "" "" "" ""
;boundary
;parts boundary
;544=512+32
;544 2 ${DEL2} 0 "--" "" "" "" ""
;all parts boundary
;1541=1+4+512+1024 or 5
;5 2 ${AREA} 0 "--" "--" "" "" ""
;1536=512+1024
1536 2 ${AREA} 0 "------------" "--" "" "01234567890abcdefghijklmnopqrstuvwxyz" ""
;1552=16+512+1024
1552 2 ${AREA} 0 "------------" "" "" "01234567890abcdefghijklmnopqrstuvwxyz" ""
;common
529 1 ${TYPE} 0 "Apparently-To:" "" "" "" ""
529 1 ${TYPE} 0 "Approved:" "" "" "" ""
529 1 ${TYPE} 0 "Authentication-Results:" "" "" "" ""
529 1 ${TYPE} 0 "Auto-Submitted:" "" "" "" ""
529 1 ${TYPE} 0 "Cache-Post-Path:" "" "" "" ""
529 1 ${TYPE} 0 "Content-Class:" "" "" "" ""
529 1 ${TYPE} 0 "Content-Description:" "" "" "" ""
529 1 ${TYPE} 0 "Content-Disposition:" "" "" "" ""
529 1 ${TYPE} 0 "Content-ID:" "" "" "" ""
529 1 ${TYPE} 0 "Content-Language:" "" "" "" ""
529 1 ${TYPE} 0 "Content-Location:" "" "" "" ""
529 1 ${TYPE} 0 "Content-Transfer-Encoding:" "" "" "" ""
529 1 ${TYPE} 0 "Content-Type:" "" "" "" ""
529 1 ${TYPE} 0 "Content:" "" "" "" ""
529 1 ${TYPE} 0 "Delivered-to:" "" "" "" ""
529 1 ${TYPE} 0 "Delivery-Date:" "" "" "" ""
529 1 ${TYPE} 0 "Disposition-Notification-to:" "" "" "" ""
529 1 ${TYPE} 0 "Distribution:" "" "" "" ""
529 1 ${TYPE} 0 "Envelope-To:" "" "" "" ""
529 1 ${TYPE} 0 "Errors-to:" "" "" "" ""
529 1 ${TYPE} 0 "FL-Build:" "" "" "" ""
529 1 ${TYPE} 0 "Followup-To:" "" "" "" ""
529 1 ${TYPE} 0 "Importance:" "" "" "" ""
529 1 ${TYPE} 0 "Lines:" "" "" "" ""
529 1 ${TYPE} 0 "List-Archive:" "" "" "" ""
529 1 ${TYPE} 0 "List-Help:" "" "" "" ""
529 1 ${TYPE} 0 "List-ID:" "" "" "" ""
529 1 ${TYPE} 0 "List-Owner:" "" "" "" ""
529 1 ${TYPE} 0 "List-Post:" "" "" "" ""
529 1 ${TYPE} 0 "List-Subscribe:" "" "" "" ""
529 1 ${TYPE} 0 "List-Unsubscribe:" "" "" "" ""
529 1 ${TYPE} 0 "Mime-Version:" "" "" "" ""
529 1 ${TYPE} 0 "Newsgroups:" "" "" "" ""
529 1 ${TYPE} 0 "Path:" "" "" "" ""
529 1 ${TYPE} 0 "Precedence:" "" "" "" ""
529 1 ${TYPE} 0 "Priority:" "" "" "" ""
529 1 ${TYPE} 0 "Received-SPF:" "" "" "" ""
529 1 ${TYPE} 0 "Return-Receipt-To:" "" "" "" ""
529 1 ${TYPE} 0 "Subscribed-as:" "" "" "" ""
529 1 ${TYPE} 0 "Thread-Index:" "" "" "" ""
529 1 ${TYPE} 0 "Thread-Topic:" "" "" "" ""
529 1 ${TYPE} 0 "User-Agent:" "" "" "" ""
529 1 ${TYPE} 0 "X-Bulkmail:" "" "" "" ""
529 1 ${TYPE} 0 "X-Confirm-Reading-To:" "" "" "" ""
529 1 ${TYPE} 0 "X-Distribution:" "" "" "" ""
529 1 ${TYPE} 0 "X-Errors-To:" "" "" "" ""
529 1 ${TYPE} 0 "X-FTN-Origin:" "" "" "" ""
529 1 ${TYPE} 0 "X-Loop:" "" "" "" ""
529 1 ${TYPE} 0 "X-Mailer:" "" "" "" ""
529 1 ${TYPE} 0 "X-Mozilla-Status2:" "" "" "" ""
529 1 ${TYPE} 0 "X-Mozilla-Status:" "" "" "" ""
529 1 ${TYPE} 0 "X-Mras:" "" "" "" ""
529 1 ${TYPE} 0 "X-Mru-Authenticated-Sender:" "" "" "" ""
529 1 ${TYPE} 0 "X-Mru-BL:" "" "" "" ""
529 1 ${TYPE} 0 "X-Mru-NR:" "" "" "" ""
529 1 ${TYPE} 0 "X-Mru-OF:" "" "" "" ""
529 1 ${TYPE} 0 "X-Mru-PTR:" "" "" "" ""
529 1 ${TYPE} 0 "X-Mru-RC:" "" "" "" ""
529 1 ${TYPE} 0 "X-Originating-Email:" "" "" "" ""
529 1 ${TYPE} 0 "X-Originating-IP:" "" "" "" ""
529 1 ${TYPE} 0 "X-PMFLAGS:" "" "" "" ""
529 1 ${TYPE} 0 "X-Priority:" "" "" "" ""
529 1 ${TYPE} 0 "X-Sender:" "" "" "" ""
529 1 ${TYPE} 0 "X-Spam:" "" "" "" ""
529 1 ${TYPE} 0 "X-UIDL:" "" "" "" ""
529 1 ${TYPE} 0 "X-Yandex-Uniq:" "" "" "" ""
529 1 ${TYPE} 0 "Xref:" "" "" "" ""
;<regexp match="/^(NNTP\-Posting\-.*?\b\:)\s(.*)$/" region0="head.word2" region2="head.content2"/>
;other
;512 1 ${STR} 0 "" ":" "" "01234567890abcdefghijklmnopqrstuvwxyz-" ""
;email
;Без точки в "Delimiters:". Чтобы @ захватывалось, не используем 128 во втором правиле.
;393=1+8+128+256
;393 2 ${OP} 0 "" "@" "" "01234567890abcdefghijklmnopqrstuvwxyz.-_" ""
;273=1+16+256
;273 2 ${OP} 0 "@" "" "" "01234567890abcdefghijklmnopqrstuvwxyz.-_" ""
;257=1+256
;257 2 ${OP} 0 "<" "@" "" "01234567890abcdefghijklmnopqrstuvwxyz.-_" ""
;1=1
;1 2 ${OP} 0 "@" ">" "" "01234567890abcdefghijklmnopqrstuvwxyz.-_" ""
;388=4+128+256
;388 2 ${OP} 0 `"` `" <` "" "" ""
;388 2 ${OP} 0 `"` `"<` "" "" ""
;String (causes bugs)
;5=1+4
;5 1 ${STR} 0 `"` `"` "" "" ""
;5 1 ${STR} 0 `'` `'` "" "" ""
;Indent
;1 1 ${NUM} 0 ">>>>>>" "" "" "" ""
;1 1 ${NUM} 0 "> > > > > >" "" "" "" ""
;1 1 ${IF} 0 ">>>>>" "" "" "" ""
;1 1 ${IF} 0 "> > > > >" "" "" "" ""
;1 1 ${NUM} 0 ">>>>" "" "" "" ""
;1 1 ${NUM} 0 "> > > >" "" "" "" ""
;1 1 ${IF} 0 ">>>" "" "" "" ""
;1 1 ${IF} 0 "> > >" "" "" "" ""
;1 1 ${NUM} 0 ">>" "" "" "" ""
;1 1 ${NUM} 0 "> >" "" "" "" ""
;1 1 ${IF} 0 ">" "" "" "" ""
QuotesRE:
;===========================================================================================
;Flags Pattern \BackRef=(FontStyle,ColorText,ColorBk) \BackRef=... ParentID RuleID
;===========================================================================================
;0 `(")([^"\\]*(\\.[^"\\]*)*)(")` `\1=(0,${DEL1},0) \2=(3,${STR},0) \4=(0,${DEL1},0)`
0 `/(NNTP\-Posting\-.*?\b\:)\s(.*)$/` `\0=(0,${DEL1},0) \2=(3,${STR},0)`
;base64, иногда ложно срабатывает
1 `([A-Za-z0-9+/][A-Za-z0-9+/][A-Za-z0-9+/][A-Za-z0-9+/]){10,20}$` `\0=(0,${AREA},0)`
Delimiters:
;===============================================
;Flags Font Color Color Char(s) Parent
; style text bkgrnd ID
;===============================================
1 0 0 0 " "
1 0 0 0 " "
1 0 ${DEL1} 0 (
1 0 ${DEL1} 0 )
;1 0 ${DEL2} 0 .
1 0 ${DEL2} 0 {
1 0 ${DEL2} 0 }
1 0 ${DEL2} 0 ,
1 0 ${DEL2} 0 :
1 0 ${DEL2} 0 ;
1 0 ${DEL2} 0 !
1 0 ${DEL2} 0 ~
1 0 ${DEL2} 0 |
1 0 ${DEL2} 0 =
1 0 ${DEL2} 0 -
1 0 ${DEL2} 0 *
1 0 ${DEL2} 0 +
1 0 ${DEL2} 0 /
1 0 ${DEL2} 0 \
1 0 ${DEL2} 0 <
1 0 ${DEL2} 0 >
1 0 ${DEL2} 0 &
1 0 ${DEL2} 0 ^
1 0 ${DEL2} 0 %
1 0 ${DEL2} 0 ?
1 0 ${DEL2} 0 [
1 0 ${DEL2} 0 ]
1 0 ${DEL2} 0 `"`
Words:
;===========================================
;Flags Font Color Color Word Parent
; style text bkgrnd ID
;===========================================
;email
;2 0 ${NUM} ${DEL2} "01234567890abcdefghijklmnopqrstuvwxyz.-@"
;----------------------------------------------;
; CodeFold ;
;----------------------------------------------;
;Flags (sum of the members)
; 1 case sensitive.
; 2 force get fold name for function list from left at the fold start ("Folds:" section only).
; 4 force get fold name for function list from right at the fold start, including fold start ("Folds:" section only).
; 8 fold start ("Folds:" section) or skip start ("Skips:" section) located at line start.
; 16 fold start ("Folds:" section) or skip start ("Skips:" section) located at line end.
; 32 fold end ("Folds:" section) or skip end ("Skips:" section) located at line start.
; 64 fold end ("Folds:" section) or skip end ("Skips:" section) located at line end.
; 128 don't catch fold end ("Folds:" section) or skip end ("Skips:" section).
; 256 additional to 128 flag - more priority is given to sibling level instead of parent level ("Folds:" section only).
; 512 comment fold - fold ignore any other folds and skips inside ("Folds:" section only).
; 1024 reserved.
; 2048 deny fold - founded fold will be ignored ("Folds:" section only).
; 4096 xml fold - "<tag" and "</tag>", "<single" and "/>", "<single" and ">" ("Folds:" section only).
; 8192 don't check delimiters from left of fold start ("Folds:" section only).
; 16384 don't check delimiters from right of fold start ("Folds:" section only).
; 32768 don't check delimiters from left of fold end ("Folds:" section only).
; 65536 don't check delimiters from right of fold end ("Folds:" section only).
; 131072 deny delimiters ("Folds:" section only).
; 262144 don't show fold in list ("Folds:" section only).
; 1048576 regular expression in fold start ("Folds:" section) or skip start ("Skips:" section).
; 2097152 regular expression in fold end ("Folds:" section) or skip end ("Skips:" section).
FoldPanel:
;=================================================================================================================================================================================================================================================================================================================================================================================================================================================================
;PanelFirstBkColor PanelSecondBkColor PanelNormalFoldColor PanelActiveFoldColor PanelNormalNodeOpenBkColor PanelNormalNodeCloseBkColor PanelActiveNodeOpenBkColor PanelActiveNodeCloseBkColor PanelNormalNodeOpenSignColor PanelNormalNodeCloseSignColor PanelActiveNodeOpenSignColor PanelActiveNodeCloseSignColor
;=================================================================================================================================================================================================================================================================================================================================================================================================================================================================
${CodeFold_PanelFirstBkColor} ${CodeFold_PanelSecondBkColor} ${CodeFold_PanelNormalFoldColor} ${CodeFold_PanelActiveFoldColor} ${CodeFold_PanelNormalNodeOpenBkColor} ${CodeFold_PanelNormalNodeCloseBkColor} ${CodeFold_PanelActiveNodeOpenBkColor} ${CodeFold_PanelActiveNodeCloseBkColor} ${CodeFold_PanelNormalNodeOpenSignColor} ${CodeFold_PanelNormalNodeCloseSignColor} ${CodeFold_PanelActiveNodeOpenSignColor} ${CodeFold_PanelActiveNodeCloseSignColor}
FoldList:
;================================================
;ListTextColor ListBkColor
;================================================
${CodeFold_ListTextColor} ${CodeFold_ListBkColor}
TagMark:
;============================================================================================================
;TagMarkFlags TagMarkFontStyle TagMarkTextColor TagMarkBkColor
;============================================================================================================
${CodeFold_TagMarkFlags} ${CodeFold_TagMarkFontStyle} ${CodeFold_TagMarkTextColor} ${CodeFold_TagMarkBkColor}
Skips:
;=============================
;Flags Skip Skip Escape
; start end char
;=============================
Folds:
;===========================================================================
;Flags Font Color Color Fold Fold Deli Parent Rule Rule
; style text bkgrnd start end miters ID ID file
;===========================================================================
;426=2+8+32+128+256
426 0 0 0 "Content-Transfer-Encoding:" "------------" ""
;For mbox
426 0 0 0 "Content-Transfer-Encoding:" "----" ""
426 0 0 0 "Content-Transfer-Encoding:" "--Multipart=" ""
;----------------------------------------------;
; AutoComplete ;
;----------------------------------------------;
;Flags (sum of the members)
; 1 force case sensitive.
; 2 force case insensitive.
; 4 regular expression (only for "$="). Scan starts from caret line beginning and metacharacters \a or \z specified caret position.
; 8 Don't show in listbox.
CompleteList:
;=====================================================================================================================================================================================================================================================================================================================================================================================================================================================================
;ListFontStyle ListFontSize ListFaceName ListLineGap ListBlockIcon `"C:\1.dll", 0` ListBlockIconMargins "left;right" ListHlBaseIcon `"C:\1.dll", 0` ListHlBaseIconMargins "left;right" ListDocWordIcon `"C:\1.dll", 0` ListDocWordIconMargins "left;right" ListBasicTextColor ListBasicBkColor ListSelTextColor ListSelBkColor
;=====================================================================================================================================================================================================================================================================================================================================================================================================================================================================
${AutoComplete_ListFontStyle} ${AutoComplete_ListFontSize} ${AutoComplete_ListFaceName} ${AutoComplete_ListLineGap} ${AutoComplete_ListBlockIcon} ${AutoComplete_ListBlockIconMargins} ${AutoComplete_ListHlBaseIcon} ${AutoComplete_ListHlBaseIconMargins} ${AutoComplete_ListDocWordIcon} ${AutoComplete_ListDocWordIconMargins} ${AutoComplete_ListBasicTextColor} ${AutoComplete_ListBasicBkColor} ${AutoComplete_ListSelTextColor} ${AutoComplete_ListSelBkColor}
Blocks:
;=============================================================================
;Abbreviations and blocks
;
; $~abbr normal abbreviation.
; $(flags)~abbr normal abbreviation with flags.
; $=abbr exact abbreviation. May contain delimiters.
; $(flags)=abbr exact abbreviation with flags. May contain delimiters.
; $[] set caret to this position. Can be multiple (hot spots).
; $[text] select text. Can be multiple (hot spots).
; $$ symbol $.
; $\] escape symbol ]. Can be used in $[text] block: $[One [1$\] ].
; ${VAR} variable assigned from Coder::Settings.
; $; comment line.
;=============================================================================