Skip to content

Commit

Permalink
Add new macro to delete the {} when inside an empty #{} block. Macro …
Browse files Browse the repository at this point in the history
…is triggered by the delete key. This means you can type #, delete and end up with just a # rather than a #}.

Tweaked syntax to support this macro

git-svn-id: http://svn.textmate.org/trunk/Bundles/Ruby.tmbundle@6332 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information
lilyball committed Dec 11, 2006
1 parent 4b4c4a8 commit 120b243
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Macros/Delete forward:backward.tmMacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>commands</key>
<array>
<dict>
<key>command</key>
<string>deleteBackward:</string>
</dict>
<dict>
<key>command</key>
<string>deleteForward:</string>
</dict>
</array>
<key>keyEquivalent</key>
<string></string>
<key>name</key>
<string>Delete forward/backward</string>
<key>scope</key>
<string>source.ruby.embedded.source.empty</string>
<key>uuid</key>
<string>A83F68A9-F751-4BB4-AE16-56812878C16A</string>
</dict>
</plist>
19 changes: 19 additions & 0 deletions Syntaxes/Ruby.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2006,6 +2006,25 @@
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.embedded.ruby</string>
</dict>
<key>1</key>
<dict>
<key>name</key>
<string>source.ruby.embedded.source.empty</string>
</dict>
</dict>
<key>match</key>
<string>#\{(\})</string>
<key>name</key>
<string>source.ruby.embedded.source</string>
</dict>
<dict>
<key>begin</key>
<string>#\{</string>
Expand Down
2 changes: 2 additions & 0 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<string>667081DE-62C3-11D9-B8CF-000D93589AF6</string>
<string>66708259-62C3-11D9-B8CF-000D93589AF6</string>
<string>66708052-62C3-11D9-B8CF-000D93589AF6</string>
<string>A83F68A9-F751-4BB4-AE16-56812878C16A</string>
</array>
<key>items</key>
<array>
Expand Down Expand Up @@ -550,6 +551,7 @@
<string>52B8BF63-F09E-4789-8407-06168A8AE666</string>
<string>A4E89D97-D5ED-48BB-B5FF-1BFB79211FCD</string>
<string>5AE7CFB4-418E-4E00-AD76-06DB755EE876</string>
<string>A83F68A9-F751-4BB4-AE16-56812878C16A</string>
<string>5B46ECFD-23A4-4F0C-9951-F64C19C72C2B</string>
<string>46BF99AD-E172-4D49-BCF7-072F4730E1D9</string>
<string>B0CE57EC-FB2E-4482-8CCE-448DC2588715</string>
Expand Down

0 comments on commit 120b243

Please sign in to comment.