From 120b243b91269c66dc0e1db24ffc50bd5d3c6463 Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Mon, 11 Dec 2006 19:26:23 +0000 Subject: [PATCH] Add new macro to delete the {} when inside an empty #{} block. Macro 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 --- Macros/Delete forward:backward.tmMacro | 25 +++++++++++++++++++++++++ Syntaxes/Ruby.plist | 19 +++++++++++++++++++ info.plist | 2 ++ 3 files changed, 46 insertions(+) create mode 100644 Macros/Delete forward:backward.tmMacro diff --git a/Macros/Delete forward:backward.tmMacro b/Macros/Delete forward:backward.tmMacro new file mode 100644 index 0000000..0c8a713 --- /dev/null +++ b/Macros/Delete forward:backward.tmMacro @@ -0,0 +1,25 @@ + + + + + commands + + + command + deleteBackward: + + + command + deleteForward: + + + keyEquivalent +  + name + Delete forward/backward + scope + source.ruby.embedded.source.empty + uuid + A83F68A9-F751-4BB4-AE16-56812878C16A + + diff --git a/Syntaxes/Ruby.plist b/Syntaxes/Ruby.plist index d833c46..e0eb96d 100644 --- a/Syntaxes/Ruby.plist +++ b/Syntaxes/Ruby.plist @@ -2006,6 +2006,25 @@ patterns + + captures + + 0 + + name + punctuation.section.embedded.ruby + + 1 + + name + source.ruby.embedded.source.empty + + + match + #\{(\}) + name + source.ruby.embedded.source + begin #\{ diff --git a/info.plist b/info.plist index 8693fed..2772793 100644 --- a/info.plist +++ b/info.plist @@ -25,6 +25,7 @@ 667081DE-62C3-11D9-B8CF-000D93589AF6 66708259-62C3-11D9-B8CF-000D93589AF6 66708052-62C3-11D9-B8CF-000D93589AF6 + A83F68A9-F751-4BB4-AE16-56812878C16A items @@ -550,6 +551,7 @@ 52B8BF63-F09E-4789-8407-06168A8AE666 A4E89D97-D5ED-48BB-B5FF-1BFB79211FCD 5AE7CFB4-418E-4E00-AD76-06DB755EE876 + A83F68A9-F751-4BB4-AE16-56812878C16A 5B46ECFD-23A4-4F0C-9951-F64C19C72C2B 46BF99AD-E172-4D49-BCF7-072F4730E1D9 B0CE57EC-FB2E-4482-8CCE-448DC2588715