My language grammar is very rusty, so correct me where I'm wrong. I'm trying to modify the language for the Mail bundle so reply quotes have syntax coloring:
I've added the following to the "patterns = {" section of the Mail language bundle:
{ name = 'comment.line.first'; match = '^[ \t]*(>[ \t]*){1}.*$\n?'; }, { name = 'comment.line.second'; match = '^[ \t]*(>[ \t]*){2}.*$\n?'; }, { name = 'comment.line.third'; match = '^[ \t]*(>[ \t]*){3}.*$\n?'; },
But in my mail text, on a line starting with > the scope still says:
text.mail.markdown text.html.markdown
Further, since making these changes, whenever I try to get scope (control shift p) on a mail document TextMate goes AWOL:
PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE 16465 TextMate 145.8% 0:45.73 4 101 24990 740M+ 20.5M 614M+ 963M+
I removed the Mail.tmbundle/Syntaxes/Mail.tmDelta file and it works again, so clearly something is wrong with my syntax above.
Quinn
On 11/13/06, Quinn Comendant quinn@strangecode.com wrote:
My language grammar is very rusty, so correct me where I'm wrong. I'm trying to modify the language for the Mail bundle so reply quotes have syntax coloring:
The scope is already in the language. (You should see it with ctrl + shift + p)
Each quoting level adds "markup.quote.markdown" to the scope, so:
You have to add it in the theme you use (in the Fonts & Colors preferences).
Add a line (+), give it a name, put "markup.quote.markdown" in Scope Selector and adjust the style.
To color the second level differently, add a line with scope "markup.quote.markdown markup.quote.markdown"
For third level scope="markup.quote.markdown markup.quote.markdown markup.quote.markdown".
etc.
-- FredB