Skip to content
Browse files

• recognize and match diff files produced by Perforce and give the la…

…nguage grammar a key equivalent (patch by Gerd Knops)

git-svn-id: http://svn.textmate.org/trunk/Bundles/Diff.tmbundle@2679 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
1 parent 01e3cd1 commit 91463a29a58759346432ad54ae952713d219f4f1 @sorbits sorbits committed
Showing with 5 additions and 3 deletions.
  1. +5 −3 Syntaxes/Diff.plist
View
8 Syntaxes/Diff.plist
@@ -8,7 +8,9 @@
<string>patch</string>
</array>
<key>firstLineMatch</key>
- <string>^(Index: |--- [^%]|\*\*\* |\d+(,\d+)*(a|d|c)\d+(,\d+)*$)</string>
+ <string>^(====\s*//.+\s-\s.+\s+====|Index: |--- [^%]|\*\*\* |\d+(,\d+)*(a|d|c)\d+(,\d+)*$)</string>
+ <key>keyEquivalent</key>
+ <string>^~D</string>
<key>name</key>
<string>Diff</string>
<key>patterns</key>
@@ -47,13 +49,13 @@
</dict>
<dict>
<key>match</key>
- <string>^((-{3} .+)|(\*{3} .+))$\n?</string>
+ <string>(^((-{3} .+)|(\*{3} .+))$\n?|^={4} .+(?= - ))</string>
<key>name</key>
<string>meta.diff.header.from-file</string>
</dict>
<dict>
<key>match</key>
- <string>^\+{3} .+$\n?</string>
+ <string>(^\+{3} .+$\n?| - .* ={4}$\n?)</string>
<key>name</key>
<string>meta.diff.header.to-file</string>
</dict>

0 comments on commit 91463a2

Please sign in to comment.
Something went wrong with that request. Please try again.