[TxMt] Mail language scope
Allan Odgaard
throw-away-1 at macromates.com
Wed Oct 25 10:24:29 UTC 2006
On 25. Oct 2006, at 09:12, Quinn Comendant wrote:
> I'm wondering why when editing an email message (using the Mail
> language) the scope is set to:
>
> text.mail.markdown
> text.html.markdown
Markdown is text.html.markdown. It allows to embed HTML so we decided
to give it a scope to indicate that it was an HTML extension [1].
The Mail bundle includes Markdown, as we decided that Markdown was a
pretty good match for the syntax used in emails, and there is some
overlap between Markdown and emails (like increase/decrease quote
level and reflow quoted text).
[1] Though today I would probably have made it just text.markdown,
and made only the tags and stuff between, text.html.
> This results in html-style commands and snippets being executed
> (comments command inserts <! -- -- > style). It seems like Text
> should be the inherited scope, with modifications ( > set as the
> comment mark).
But ‘>’ does not mark a comment, it marks quoted text (which can be
multiple levels). There is a key equivalent for increasing and
decreasing the quotation level (it mimicks the one used in Eudora and
Mail).
> Which begs another question: how to import the Text language bundle
> into the Mail bundle. (So that I can have plain text scopes and
> thus syntax coloring).
Since the scope starts with text, everything scoped to text already
works.
Which kind of syntax highlight do you want? Markdown already
highlights quoted text, _italic_, **bold**, <http://macromates.com/>
(URLs), > quoted text, * list items, and more.
More information about the textmate
mailing list