Permalink
Browse files

• change language grammar to support optional headers at the top (e.g…

…. ‘From: me@example.com’) and just include Markdown for the body

• change scope name from text.plain.mail to text.mail.markdown
• update scope selectors for commands
• remove scope selector for increase/decrease quote level (I need this e.g. in Markdown)
• let the unwrap, reformat, and continue quote use just markup.scope as scope selector (so it’s not limited to mails)


git-svn-id: http://svn.textmate.org/trunk/Bundles/Mail.tmbundle@4528 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
sorbits committed Jul 31, 2006
1 parent f903af2 commit c638761cb483c4b635caa1b43bb87ca7179e0a65
@@ -16,8 +16,6 @@
<string>Increase Quote Level for Line / Selection</string>
<key>output</key>
<string>replaceSelectedText</string>
- <key>scope</key>
- <string>text.plain.mail</string>
<key>uuid</key>
<string>9FEC1836-6E52-11D9-AA12-000D93589AF6</string>
</dict>
@@ -19,7 +19,7 @@ PARINIT="rTbgqR B=.,?!_A_a Q=_s&gt;|+" par</string>
<key>output</key>
<string>replaceSelectedText</string>
<key>scope</key>
- <string>text.plain.mail markup.quote</string>
+ <string>markup.quote</string>
<key>uuid</key>
<string>65C64E73-D308-4251-9837-A3A040D5704B</string>
</dict>
@@ -16,8 +16,6 @@
<string>Decrease Quote Level for Line / Selection</string>
<key>output</key>
<string>replaceSelectedText</string>
- <key>scope</key>
- <string>text.plain.mail</string>
<key>uuid</key>
<string>B0F37DAC-6E52-11D9-AA12-000D93589AF6</string>
</dict>
@@ -50,7 +50,7 @@ end
<key>output</key>
<string>replaceSelectedText</string>
<key>scope</key>
- <string>text.plain.mail</string>
+ <string>text.mail</string>
<key>uuid</key>
<string>72DCB8FA-2DAF-46D2-A77C-3459EE982EF6</string>
</dict>
@@ -10,7 +10,7 @@ ${TM_CURRENT_LINE/^([&gt; \t]*).*/$1/}</string>
<key>name</key>
<string>Continue Quotation</string>
<key>scope</key>
- <string>text.plain.mail markup.quote.mail</string>
+ <string>markup.quote</string>
<key>uuid</key>
<string>F8AFD37B-9471-4B61-B626-6956CAD8C8CA</string>
</dict>
View
@@ -9,7 +9,7 @@
<key>name</key>
<string>Insert [...]</string>
<key>scope</key>
- <string>text.plain.mail</string>
+ <string>text.mail</string>
<key>uuid</key>
<string>40BDA523-6089-4705-9006-43EA2D17A0F1</string>
</dict>
View
@@ -6,122 +6,57 @@
<array>
<string>mail</string>
</array>
+ <key>firstLineMatch</key>
+ <string>^From: (?=\w+@[\w-]+\.\w+)</string>
<key>keyEquivalent</key>
<string>^~M</string>
<key>name</key>
<string>Mail</string>
<key>patterns</key>
<array>
<dict>
- <key>begin</key>
- <string>^(&gt; ?)(&gt; ?)(&gt;(?: )?)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
- <string>markup.quote.mail.single</string>
+ <string>keyword.other.mail</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
- <string>markup.quote.mail.double</string>
- </dict>
- <key>3</key>
- <dict>
- <key>name</key>
- <string>markup.quote.mail.many</string>
+ <string>string.unquoted.mail</string>
</dict>
</dict>
- <key>end</key>
- <string>$\n?</string>
- <key>name</key>
- <string>markup.quote.mail</string>
- <key>patterns</key>
- <array>
- <dict>
- <key>include</key>
- <string>#url</string>
- </dict>
- </array>
- </dict>
- <dict>
- <key>begin</key>
- <string>^(&gt; ?)(&gt;(?: )?)</string>
- <key>captures</key>
- <dict>
- <key>1</key>
- <dict>
- <key>name</key>
- <string>markup.quote.mail.single</string>
- </dict>
- <key>2</key>
- <dict>
- <key>name</key>
- <string>markup.quote.mail.double</string>
- </dict>
- </dict>
- <key>end</key>
- <string>$\n?</string>
+ <key>match</key>
+ <string>^([a-zA-Z-]+):\s*(.*)$\n?</string>
<key>name</key>
- <string>markup.quote.mail</string>
- <key>patterns</key>
- <array>
- <dict>
- <key>include</key>
- <string>#url</string>
- </dict>
- </array>
+ <string>meta.headers.mail</string>
</dict>
<dict>
<key>begin</key>
- <string>^&gt;(?: )?</string>
+ <string>^(?![A-Za-z0-9]+:)</string>
<key>end</key>
- <string>$\n?</string>
- <key>name</key>
- <string>markup.quote.mail.single</string>
- <key>patterns</key>
- <array>
- <dict>
- <key>include</key>
- <string>#url</string>
- </dict>
- </array>
- </dict>
- <dict>
- <key>match</key>
- <string>^-- $\n</string>
+ <string>^(?=not)possible$</string>
<key>name</key>
- <string>meta.separator.signature.mail</string>
- </dict>
- <dict>
- <key>include</key>
- <string>#url</string>
- </dict>
- </array>
- <key>repository</key>
- <dict>
- <key>url</key>
- <dict>
+ <string>text.html.markdown</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
- <string>((https?|ftp|file|txmt)://|mailto:)[-:@a-zA-Z0-9_./%?=&amp;#]+</string>
+ <string>^-- $\n</string>
<key>name</key>
- <string>markup.underline.link</string>
+ <string>meta.separator.signature.mail</string>
</dict>
<dict>
- <key>match</key>
- <string>\b[a-zA-Z0-9_.]+@[-a-zA-Z0-9_.]+\b</string>
- <key>name</key>
- <string>markup.underline.link.email</string>
+ <key>include</key>
+ <string>text.html.markdown</string>
</dict>
</array>
</dict>
- </dict>
+ </array>
<key>scopeName</key>
- <string>text.plain.mail</string>
+ <string>text.mail.markdown</string>
<key>uuid</key>
<string>15615A0C-37B0-4B3F-9105-53ED536AFBB4</string>
</dict>

0 comments on commit c638761

Please sign in to comment.