From 8379b2e7abac02219763846a48ad2d0d97a009ef Mon Sep 17 00:00:00 2001 From: James Edward Gray II Date: Tue, 8 Jul 2008 16:49:19 +0000 Subject: [PATCH] Adding a snippet for enserting a require and ensuring that RubyGems has already been required. git-svn-id: http://svn.textmate.org/trunk/Bundles/Ruby.tmbundle@10206 dfb7d73b-c2ec-0310-8fea-fb051d288c6d --- "Macros/require_gem \"__\".tmMacro" | 51 +++++++++++++++++++++++++ "Snippets/require_gem \"__\".tmSnippet" | 16 ++++++++ info.plist | 3 ++ 3 files changed, 70 insertions(+) create mode 100644 "Macros/require_gem \"__\".tmMacro" create mode 100644 "Snippets/require_gem \"__\".tmSnippet" diff --git "a/Macros/require_gem \"__\".tmMacro" "b/Macros/require_gem \"__\".tmMacro" new file mode 100644 index 0000000..bc81569 --- /dev/null +++ "b/Macros/require_gem \"__\".tmMacro" @@ -0,0 +1,51 @@ + + + + + commands + + + command + moveToBeginningOfDocumentAndModifySelection: + + + argument + + command + insert_requires.rb rubygems + input + selection + output + insertAsSnippet + + command + executeCommandWithOptions: + + + argument + + content + require "$0" + name + require_gem ".." + scope + source.ruby + tabTrigger + reqg- + uuid + 34FEBB9F-73CD-4DD4-A0A3-1CF2A5E3DE78 + + command + insertSnippetWithOptions: + + + name + require_gem ".." + scope + source.ruby + tabTrigger + reqg + uuid + 33969819-62C5-4E03-B824-C2337205F364 + + diff --git "a/Snippets/require_gem \"__\".tmSnippet" "b/Snippets/require_gem \"__\".tmSnippet" new file mode 100644 index 0000000..fb4ff9d --- /dev/null +++ "b/Snippets/require_gem \"__\".tmSnippet" @@ -0,0 +1,16 @@ + + + + + content + require "$0" + name + require_gem ".." + scope + source.ruby + tabTrigger + reqg- + uuid + 34FEBB9F-73CD-4DD4-A0A3-1CF2A5E3DE78 + + diff --git a/info.plist b/info.plist index 34a4189..467d1a4 100644 --- a/info.plist +++ b/info.plist @@ -241,6 +241,7 @@ ------------------------------------ A05CBDD6-845D-45EB-94FB-F8787F5456BE 97DE939B-D243-4D5C-B953-1C9090912E7C + 34FEBB9F-73CD-4DD4-A0A3-1CF2A5E3DE78 E16D24D2-CC7E-4786-BE0B-1725FC865D78 21C0D711-F32A-4665-AA0D-B136F9DD3945 49D69DEC-6991-49F4-8D9B-BA60BFDD3D17 @@ -448,6 +449,7 @@ 7990EE60-C850-4779-A8C0-7FD2C853B99B 121B334B-2AA6-4E9A-A8B8-BF93B627982B 58FDEA60-10AF-4C49-AA09-29B77030DB25 + 33969819-62C5-4E03-B824-C2337205F364 7E084412-80E6-4B70-8092-C03D1ECE4CD2 EC73D5CC-5F05-46B9-A6F4-82037E4A38C9 825B721D-4367-4DF7-98C0-F005695DF9E3 @@ -497,6 +499,7 @@ 451A0596-1F72-4AFB-AF2F-45900FABB0F7 A05CBDD6-845D-45EB-94FB-F8787F5456BE 97DE939B-D243-4D5C-B953-1C9090912E7C + 34FEBB9F-73CD-4DD4-A0A3-1CF2A5E3DE78 E16D24D2-CC7E-4786-BE0B-1725FC865D78 21C0D711-F32A-4665-AA0D-B136F9DD3945 49D69DEC-6991-49F4-8D9B-BA60BFDD3D17