El 25/08/2008, a las 8:51, textmate-request@lists.macromates.com escribió:
Message: 3 Date: Sun, 24 Aug 2008 18:20:22 +0200 From: Allan Odgaard mailinglist@textmate.org Subject: [TxMt] Re: Opening Ruby Headers To: TextMate users textmate@lists.macromates.com Message-ID: F30AFE9C-7991-42B7-B703-B9955B7335DE@textmate.org Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes
On 24 Aug 2008, at 17:16, Juan Falgueras wrote:
I have extended my old C/C++ headers opener to Ruby. I have associate it to Shift-Cmd-D as in the classic MPW ;)
There already is a header opener on ??D scoped to Ruby.
I finally have found the place you said, Shift-Cmd-D was (I did
mkdir -p /Library/Application\ Support/TextMate/Bundles cd /Library/Application\ Support/TextMate/Bundles svn co http://macromates.com/svn/Bundles/trunk/Bundles/Ruby.tmbundle
and reload bundles in Ruby. It has been the first time I have done this. Ok.
I've found this for "Open Require"
#!/usr/bin/env ruby
file = STDIN.read.sub(/\A(["'])(.*)(.rb)?\1\z/, '\2.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 "Could not find include: ‘#{file}’" end
The result of exec it on a simple line as:
require 'test/unit'
is
Could not find include: ‘test/unit ’
shown as tool tip.
Clearly bad. Not only it looks for files badly, it also ignores the places where ruby use to look for its required.
Although the rest of ruby package contains useful things.
(moreover, the scope in the command was bad, it was:
source.ruby meta.require string.quoted
without commas, and it was necessary for me to insert commas to make it work)
- juan falgueras
On 25 Aug 2008, at 17:07, Juan Falgueras wrote:
[...] There already is a header opener on ??D scoped to Ruby.
I finally have found the place you said, Shift-Cmd-D was (I did
[svn checkout]
and reload bundles in Ruby. It has been the first time I have done this. Ok.
It is a default bundle. Maybe better to do http://wiki.macromates.com/Troubleshooting/RevertToDefaultBundles as it sounds like the lack of this command is not the only discrepancy.
[...] The result of exec it on a simple line as: [...] Could not find include: ‘test/unit
That test works fine here. It opens /System/Library/Frameworks/ Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/test/unit.rb
[...] (moreover, the scope in the command was bad, it was:
source.ruby meta.require string.quoted
without commas, and it was necessary for me to insert commas to make it work)
That scope selector IS correct. If the string in a ruby require line does not get that scope, then likely your ruby language grammar is at fault, hence I think you want to try and revert to default bundles.