forked from drnic/ruby-tmbundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
• scan Ruby’s include path for a file named after the current word an…
…d open it in a new window if found (mainly useful for require 'something' lines and analog to our Quick Open in C) git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/Ruby.tmbundle@3781 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
- Loading branch information
duff
committed
Jun 23, 2006
1 parent
5e52c18
commit a3086e3
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?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>beforeRunningCommand</key> | ||
<string>nop</string> | ||
<key>command</key> | ||
<string>#!/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 | ||
</string> | ||
<key>input</key> | ||
<string>none</string> | ||
<key>keyEquivalent</key> | ||
<string>@D</string> | ||
<key>name</key> | ||
<string>Open Require</string> | ||
<key>output</key> | ||
<string>showAsTooltip</string> | ||
<key>scope</key> | ||
<string>source.ruby</string> | ||
<key>uuid</key> | ||
<string>8646378E-91F5-4771-AC7C-43FC49A93576</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters