From a3086e35ce4009ce093416733b96ac473418d964 Mon Sep 17 00:00:00 2001 From: duff Date: Fri, 23 Jun 2006 22:46:49 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=A2=20scan=20Ruby=E2=80=99s=20include=20p?= =?UTF-8?q?ath=20for=20a=20file=20named=20after=20the=20current=20word=20a?= =?UTF-8?q?nd=20open=20it=20in=20a=20new=20window=20if=20found=20(mainly?= =?UTF-8?q?=20useful=20for=20require=20'something'=20lines=20and=20analog?= =?UTF-8?q?=20to=20our=20Quick=20Open=20in=20C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/Ruby.tmbundle@3781 dfb7d73b-c2ec-0310-8fea-fb051d288c6d --- Commands/Open Require.tmCommand | 33 +++++++++++++++++++++++++++++++++ info.plist | 4 ++++ 2 files changed, 37 insertions(+) create mode 100644 Commands/Open Require.tmCommand diff --git a/Commands/Open Require.tmCommand b/Commands/Open Require.tmCommand new file mode 100644 index 0000000..b1c4ddf --- /dev/null +++ b/Commands/Open Require.tmCommand @@ -0,0 +1,33 @@ + + + + + beforeRunningCommand + nop + command + #!/usr/bin/env ruby + +file = ENV['TM_CURRENT_WORD'].to_s + '.rb' +dir = $:.find { |d| File.exist?(File.join(d, file)) } + +if dir && file then + ENV['FILE'] = File.join(dir, file) + %x{ "$TM_SUPPORT_PATH/bin/mate" "$FILE" } +else + puts "File not found." +end + + input + none + keyEquivalent + @D + name + Open Require + output + showAsTooltip + scope + source.ruby + uuid + 8646378E-91F5-4771-AC7C-43FC49A93576 + + diff --git a/info.plist b/info.plist index 016227f..9f9a996 100644 --- a/info.plist +++ b/info.plist @@ -24,11 +24,13 @@ items + 35222962-C50D-4D58-A6AE-71E7AD980BE4 8C102BE9-6E49-11D9-A933-000D93589AF6 5289EE40-86B8-11D9-A8D4-000A95E13C98 569C9822-8C41-4907-94C7-1A8A0031B66D ------------------------------------ 63F3B3B7-CBE2-426B-B551-657733F3868B + 8646378E-91F5-4771-AC7C-43FC49A93576 EE5F19BA-6C02-11D9-92BA-0011242E4184 ------------------------------------ EE5F1FB2-6C02-11D9-92BA-0011242E4184 @@ -348,12 +350,14 @@ Ruby ordering + 35222962-C50D-4D58-A6AE-71E7AD980BE4 8C102BE9-6E49-11D9-A933-000D93589AF6 5289EE40-86B8-11D9-A8D4-000A95E13C98 569C9822-8C41-4907-94C7-1A8A0031B66D EE5F19BA-6C02-11D9-92BA-0011242E4184 76FCF165-54CB-4213-BC55-BD60B9C6A3EC 63F3B3B7-CBE2-426B-B551-657733F3868B + 8646378E-91F5-4771-AC7C-43FC49A93576 EE5F1FB2-6C02-11D9-92BA-0011242E4184 FBFC214F-B019-4967-95D2-028F374A3221 1AD6A138-2E89-4D6A-AB3F-416BF9CE968D