[TxMt] Re: textmate Digest, Vol 3, Issue 43
Juan Falgueras
jfalgueras at uma.es
Mon Aug 25 15:07:39 UTC 2008
El 25/08/2008, a las 8:51, textmate-request at lists.macromates.com
escribió:
> Message: 3
> Date: Sun, 24 Aug 2008 18:20:22 +0200
> From: Allan Odgaard <mailinglist at textmate.org>
> Subject: [TxMt] Re: Opening Ruby Headers
> To: TextMate users <textmate at lists.macromates.com>
> Message-ID: <F30AFE9C-7991-42B7-B703-B9955B7335DE at 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
More information about the textmate
mailing list