Files
zyedidia.micro/runtime/syntax/mail.yaml
Jöran Karl 433879046e Improve file detection with signature check capabilities
This allows more complex detection upon regex rules for a certain amount of
lines.
2023-10-26 20:20:02 +02:00

26 lines
602 B
YAML

filetype: mail
detect:
filename: "(.*/mutt-.*|\\.eml)$"
signature: "^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: []