mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 06:37:14 +09:00
Use new syntax highlighting engine from zyedidia/highlight
This changes all the syntax files in the runtime directory and also changes how syntax highlighting is done from inside micro.
This commit is contained in:
25
runtime/syntax/mail.yaml
Normal file
25
runtime/syntax/mail.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
filetype: mail
|
||||
|
||||
detect:
|
||||
filename: "(.*/mutt-.*|\\.eml)$"
|
||||
header: "^From .* \\d+:\\d+:\\d+ \\d+"
|
||||
|
||||
rules:
|
||||
- type: "^From .*"
|
||||
- identifier: "^[^[:space:]]+:"
|
||||
- preproc: "^List-(Id|Archive|Subscribe|Unsubscribe|Post|Help):"
|
||||
- constant: "^(To|From):"
|
||||
- constant.string:
|
||||
start: "^Subject:.*"
|
||||
end: "$"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- statement: "<?[^@[:space:]]+@[^[:space:]]+>?"
|
||||
- default:
|
||||
start: "^\\n\\n"
|
||||
end: ".*"
|
||||
rules: []
|
||||
- comment:
|
||||
start: "^>.*"
|
||||
end: "$"
|
||||
rules: []
|
||||
Reference in New Issue
Block a user