Git Product home page Git Product logo

ruby.tmbundle's Introduction

Installation

You can install this bundle in TextMate by opening the preferences and going to the bundles tab. After installation it will be automatically updated for you.

General

License

If not otherwise specified (see below), files in this repository fall under the following license:

Permission to copy, use, modify, sell and distribute this
software is granted. This software is provided "as is" without
express or implied warranty, and with no claim as to its
suitability for any purpose.

An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”.

ruby.tmbundle's People

Contributors

alhadis avatar awaiters avatar carlosbrando avatar ciaran avatar dhh avatar elia avatar elifoster avatar estum avatar gbh avatar hediyi avatar hovsater avatar infininight avatar jeg2 avatar kachick avatar kevinsawicki avatar ldaley avatar lilyball avatar mamenama avatar nathany avatar nikhilofthesouth avatar noniq avatar oscarbarrett avatar reitermarkus avatar sanssecours avatar sorbits avatar soryu avatar stonefield avatar subtlegradient avatar torsten avatar whatcould avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ruby.tmbundle's Issues

New Method command doens't work properly

There are a couple of issues with the New Method command.

  1. Doesn't work for class methods. Typing self.foo and invoke the command results in:

    self.def foo (args)
    
    end
  2. The command behaves strangely when removing (args) and then starts typing. Steps to reproduce:

    1. Type "foo"
    2. Invoke the command
    3. Press backspace to remove (args)
    4. Type "bar"

    The result is this:

    def foo   ((ar))r)) 
    end

    And there are now three cursors.

  3. The command doesn't work if a method ends with ? or !. Typing foo! and invoking the command results in this:

    foodef !(args)
    
    end

Beautify code?

Sorry if this is handled elsewhere, but I continue to find myself wanting to "copy this pasted code, run it through a beautify/tidy-style script".
Should that be part of the bundle, since each language's syntax/style is specific to that language?

Run Focused Unit Test question

Why there are so many arguments in run_script.rb for running minitest's spec at line 33:

args << %Q{--name="/test_spec \\{.*#{context}\\} \\d{3} \\[#{spec}\\]/"}

Does it actually work for someone or am I just using it wrong? It just does not work with curren Ruby version (ruby 2.1.0p0) for me. When I change it to just

args << "--name=/#{context}/"

it works like a charm.

Am I missing something?

Treat ruby methods that end with ! or ? as one word

(Moved from http://github.com/textmate/issues/249)

Methods that end with ! ? are really common in ruby, yet TM2 does not treat them as single word.
So for example, when Im using a CTAGS bundle, the bundle tries to find the word under the cursors, and fails because it didn't include the ! or ? characters.
In general, it is annoying to have to click and drag to select the method instead of just double clicking.
Tried taking a look at the the language definition but it seems the bundle does not have a match for method calls.

Cmd-R not working in TextMate 1

Hello,

I'm not sure if this bundle should still work in TextMate 1, but in any case: when installing it, running a Ruby script no longer works: there is not even a window popping up, pressing Cmd-R seems to do nothing, neither does selecting Bundles -> Ruby -> Run.

I installed using

cd ~/Library/Application\ Support/TextMate/Bundles/
git clone git://github.com/textmate/ruby.tmbundle.git Ruby.tmbundle
osascript -e 'tell app "TextMate" to reload bundles'

and have these set in TextMate as well:

TM_RUBY=/Users/tom/.rbenv/shims/ruby
PATH=...original path here...:/Users/tom/.rbenv/bin

If I remove the Ruby bundle dir again:

rm -rf ~/Library/Application\ Support/TextMate/Bundles/Ruby.tmbundle

Then running Ruby scripts again works fine.

`for_fd': Bad file descriptor

When running any script when the system ruby is 2.0+, the following appears in the output window systematically:

catch_exception.rb:12: in `for_fd': Bad file descriptor (Errno::EBADF)
    from /Users/samuel/Library/Application Support/TextMate/Managed/Bundles/Ruby.tmbundle/Support/RubyMate/catch_exception.rb:12:in `block in <top (required)>'
untitled 2:24: in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)

Not working with PhpStorm 2016.3 ?

Hi,

I updated my PhpStorm version to 2016.3 and now the background color of my Vagrantfile is white... The ruby.tmbundle does'nt seems to work with this new version ?

Rakemate failing to run (with RVM)

RakeMate v2.0.0 running on Ruby v1.9.1 (/Users/danny/.rvm/bin/textmate_ruby)
>>> /Users/danny/workspace/ruby/projectxyz/Rakefile

/Users/danny/Library/Application Support/TextMate/Bundles/ruby.tmbundle/Support/RakeMate/rake_mate.rb:49:in `': undefined method `grep' for # (NoMethodError)

This is using RVM, with the following settings in TextMate environment:
TM_RAKE => /Users/danny/.rvm/bin/textmate_rake
TM_RUBY => /Users/danny/.rvm/bin/textmate_ruby

Along with the latest version of this, cloned into my dir today, and TextMate Version 1.5.10 (1623).

ruby18 - Run focused unit test with a newer ruby (2.1.1)

Problem

I think that "run focused unit test" broke for me around may 2014.

It appears that TextMate is trying to use ruby 1.8, where it in the past have used a newer ruby where it worked. I guess it used the system ruby or perhaps the rvm default ruby.

screen shot 2014-07-17 at 21 49 05

Solution

I managed to fix it, but I'm not sure if it's the best approach?

Open the Bundle Editor and navigated like this "Ruby -> Menu Actions -> Run focused unit test"

Change from using ruby18, like this

ruby18 -KU -- "$TM_BUNDLE_SUPPORT/RubyMate/run_script.rb" --name=

To using ruby 2.1.1, like this

/Users/neoneye/.rvm/bin/rvm-auto-ruby -KU -- "$TM_BUNDLE_SUPPORT/RubyMate/run_script.rb" --name=

Now I can run focused unit tests again.

screen shot 2014-07-17 at 21 50 35

Environment

TextMate version 2.0-alpha.9551

OS X 10.9.4

Ruby is installed via RVM

prompt> ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin12.0]
prompt> rvm -v
rvm 1.25.28 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]

(low priority) Ruby syntax highlighting issue for regex literals with ! - or + operators

From @jeff-hykin on December 24, 2017 4:45

  • VSCode Version: 1.19
  • OS Version: macOS 10.12.6
  • tested with extensions disabled

Steps to Reproduce:

audience = "world"
thing = ! /hello #{audience}/
puts thing 
#>>> true 

The syntax highlighting for /hello #{audience}/ is screwed up. The problem also exists if the - or + operators are used, however the ~ operator has the correct highlighting.

Solution:

This is a pretty small problem, so mentioning this in the ruby.tmLanguage.json is probably sufficient.

I'm somewhat familiar with language files so I might be able to add a fix and create a pull request in the next few weeks.

Copied from original issue: microsoft/vscode#40769

Indentation issue with Ruby 2.1 method declarations.

In Ruby 2.1 defining a method returns a symbol that represents the method name instead of nil. This allows you to do cool things like this:

    private def foo_bar
    end

Unfortunately, TextMate's Ruby indentation does not seem to support this and indents it like this:

    private def foo_bar
end

Recognition of multi-line comments

Issue

Ruby supports multi-line comments using the “=begin” and “=end” delimiters. Every physical line between the delimiters is ignored by the compiler. TextMate should recognize and display these delimiters and their contents as comments. (The Rails bundle should too.)

Source

Thomas, Dave, Chad Fowler and Andy Hunt. The Ruby Language. “Programming Ruby: The Pragmatic Programmer’s Guide.” Addison Wesley Longman, Inc., 2001. 30 December 2009 http://www.ruby-doc.org/docs/ProgrammingRuby/html/language.html.

XML Heredoc

I came here to investigate how I could add XML Heredoc support, and I found this recent commit which I think addresses the problem I am having bf1a0e5.

But I still do not see XML Heredoc highlighting. What am I doing wrong? How can I add this support?

xml = <<-XML
  <foo>
    <bar>string</bar>
  </foo>
XML

html = <<-HTML
  <foo>
    <bar>string</bar>
  </foo>
HTML

Error::EBADF in catch_exception

If I run a ruby script and it generates an error, rather than getting a pretty output I get:

TextMate/Pristine Copy/Bundles/Ruby.tmbundle/Support/RubyMate/catch_exception.rb:12:in `for_fd': Bad file descriptor (Errno::EBADF)

The line in catch_exception that's causing this is:

io = IO.for_fd(ENV['TM_ERROR_FD'].to_i)

For what it's worth, TM_ERROR_FD seems to be set to 14 here. Setting it to other values (tried 1 through 14) doesn't seem to help much.

I don't know what's causing this, but my poking around hasn't revealed anything useful. I have a feeling it's not related to the ruby bundle - more likely I've screwed something up. Any guidance?

  • TextMate version: 1.5.10 (1631)
  • ruby version: ruby 2.0.0dev (2012-03-26 trunk 35141) [x86_64-darwin10.8.0]
  • rvm version: 1.13.0
  • OS X version: 10.7.3

Can't type closing } as part of interpolated ruby string

I have the following problem, when having interpolation in a ruby string, I can't close it (can't type the closing bracket).

See screenshot for where my cursor is, and when I try to type a } it just puts the cursor one character to the right, so in this case outside of the string. Even if I try to insert a } on a new line it won't work.

screen

1.5.11 (1635): Faulty syntax highlighting

For example, open a file with the following contents in TextMate 1.5.11 (1635) and turn Ruby syntax highlighting on:

#!/usr/bin/ruby
require 'thread'

# Config start
chars = %w(R X F Z N T K Y A)
length = 10
pad = 10
# Config end

runtime = -1
start = Time.now.to_i
print 'Starting up'
if ARGV[0].to_i > 0
    runtime = ARGV[0].to_i
    print ', will run %i seconds' % runtime
end
print '...'

values = Queue.new
countMtx = Mutex.new
count = 0
lower = ('1' << ('0'*(length-1))).to_i
upper = ('9'*length).to_i

producer = Thread.new do
    while runtime == -1 || (Time.now.to_i < start + runtime) do
        values.push rand(lower..upper)
        countMtx.synchronize do
            count += 1
            puts 'Prd' << ('#' << count.to_s).rjust(pad) << ': Produced an object;' << ' '*((length*2-18>0) ? length*2-18 : 0) << 'Queue: ' << values.length.to_s << " object#{(values.length==1)?'':'s'} in now"
        end
        sleep 0.05
        if rand(0..10) == 0
            sec = rand(0.5..4.0)
            countMtx.synchronize do
                count += 1
                puts 'Prd' << ('#' << count.to_s).rjust(pad) << ': ' << '-'*(length*2) << " Producer suspended for #{'%.02f' % sec} second#{(sec!=1) ? 's' : ''}"
            end
            sleep sec
        end
    end
end

consumer = Thread.new do
    while true do
        numArray = values.pop(false).to_s.split(//).map do |x|
            if rand(0..1) == 0
                chars[x.to_i-1]
            else
                x
            end
        end
        countMtx.synchronize do
            count += 1
            puts 'Con' << ('#' << count.to_s).rjust(pad) << ': ' << numArray.join(' ') << '; ' << ' '*((18-length*2>0) ? 18-length*2 : 0) << ((values.empty?) ? 'Queue emptied, waiting for refill' : 'Backlog: ' << values.length.to_s << " object#{(values.length!=1) ? 's' : ''} left in queue")
        end
        sleep rand(0.05..0.3)
    end
end

puts ' initialized.'
producer.join

(Oh dear, even GitHub's syntax highlighting doesn't properly recognize that...)

Starting in line 30, syntax highlighting is broken.
I believe the problem's source is that the "... #{'...'} ..." construct isn't properly recognized by TM.

It's valid Ruby code, 1.9.3 properly runs it, and XCode's syntax highlighting engine properly recognizes the syntax.

Btw.: TM uses the obsolete old Ruby 1.8.7 system default and there's no way to change the Ruby version to use when cmd-R-ing - no support for multiple installations via RVM.

Support new Ruby 2.0 %i{x y z} syntax for creating symbols list

line 1518 - literal incapable of interpolation -- {}

Fix:

            <string>%[qwsi]\{</string>
            <key>beginCaptures</key>
            <dict>
                <key>0</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.string.begin.ruby</string>
                </dict>
            </dict>
            <key>comment</key>
            <string>literal incapable of interpolation -- {}</string>

But needs more to function correctly. Anyone?

Provide API for running Ruby executables like rspec, rubocop etc.

This is a feature request. I’ll be happy to provide a PR for this, but I want to discuss the feature in advance to see if it makes sense.

Running Ruby executables like rspec or rubocop turns out to be rather complicated nowadays: You need to support binstubs, Gemfiles and bundle exec, maybe RVM or rbenv, …

Currently, various bundles implement something along this lines on their own, reinventing the wheel again and again. See the discussion in #99 for an example. Other bundles that come to my mind are (and I wouldn’t be surprised if there are more):

I think this functionality – “reliably run a Ruby executable” – should be provided by the Ruby bundle as a public API to be used by other bundles (note that it’s possible for bundles to require other bundles).

Before implementing this I want to discuss two questions:

  • Should the Ruby bundle provide this feature?
  • What is the definitive way of running a Ruby executable anyway? (All current implementations are slightly different).

Here’s my suggestion on how to implement the feature:

  1. Look for a binstub (e.g. bin/rubocop, bin/rspec, …) and use it, if present. (This is especially important for projects using preloaders like Spring.)
  2. Check if a Gemfile (or a Gemfile.lock?) exists and contains an entry for the executable’s gem. If so, run the executable with bundle exec …
  3. Assume that the executable is installed globally and in the search path, so just run it via it’s name (with the project directory as working dir, to make sure rbenv is happy). If the corresponding environment variable (TM_RUBOCOP, TM_RSPEC, …) is set, use this as name instead.

Comments and feedback welcome! (Especially from RVM users as this is something I don’t use myself. Do we need any special steps to make this work smoothly with RVM?)

Assert equal snippet does not work properly

Hello,

I'm trying to use the Ruby assert equal snippet and it is not working as expected.

Reproduction steps:

  • Open a file using the ruby syntax touch foo.rb; mate foo.rb
  • Type ase
  • Press tab

Output:

assert_equal/bin/sh: snippet_paren.rb: command not foundexpected, actual/bin/sh: snippet_paren.rb: command not found

Expected output:

assert_equal(expected, actual)

I tried setting TM_RUBY in both ~/.textmate_init and in the preferences pane (⌘, > Variables > +, TM_RUBY)


Not sure if this is relevant, but when I try to execute a command in ruby, it gives me the following error:

Can't find “/Users/josh/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby” on PATH.

The current PATH is:

/usr/bin
/bin
/usr/sbin
/sbin
/Users/josh/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin
/opt/local/bin
/usr/local/bin
/usr/texbin
/Users/josh/.rubies/ruby-2.0.0-p247/bin

It apparently is looking for a specific Ruby installed with rvm. However, I do not have rvm installed, and have not tried to setup textmate to use rvm at all.

Add block-openers/"end" to smart block typing pairs

Seems like we should add the closing "end" below the various block openers ("def", "if", etc.) upon hitting the newline as part of the standard smart block typing pairs (eg. alongside "()", "{}", etc.).

Annoying un-indent in HTML (Ruby - ERB)

Anytime you write some construction like this:

<% something do %>
  <% something_first %>
  <% something_second %>
<% end %>

The first string is always un-indenting during editing, and one always need to indent it again, after each edit.

<% something do %>
<% something_first %>
  <% something_second %>
<% end %>

This appears only in blocks, but not in this case (which is wrong):

<% something %>
  <% something_first %>
    <% something_second %>

^H documentation always use ruby 1.8

I use ruby 1.9.3 from rvm, and already set TM_RUBY variable

if I write
puts RUBY_VERSION
it shows 1.9.3

but when using ^H to see the documentation, it always shows "Ruby 1.8 Documentation".

Ruby syntax highlighter fails when parameter defaults contain a nested Hash

From @nelseric on July 31, 2017 0:22

  • VSCode Version: 1.14.2
  • OS Version: Mac OS X 10.11.6

Steps to Reproduce:

  1. Create a new ruby file with the contents
def complicated_params(options = {
  column_mapping: {
    'account_number' => 'acct_no',
    'mailing_address' => 'mail_addr_line_1',
    'customer_name' => ['customer_name', 'company_name'],
  },
})

  pp options
end

image

Reproduces without extensions: Yes

Copied from original issue: microsoft/vscode#31738

`end` doesn't un-indent

I expect after starting to define a class or function, if I use end, it should un indent after the d.

def fun
  call_something
  end

Anyone else getting this? (Since yesterdays update)

behavior of double clicking a :symbol

When double clicking a symbol in TM2, it selects the entire thing: :development

In both Sublime Text and BBEdit it just selects development. This is quite difficult to get use to.

Is it intentional? Is that something that can be changed via the Bundle (whether officially or in my own copy of it)?

I had a look through Ruby.plist but I don't know exactly what I'm looking for.

Errors cloning repository on Windows

Today cloned a bundle on my Windows machine. Got the following errors:

d:\PHPProjects>git clone https://github.com/textmate/ruby.tmbundle
Cloning into 'ruby.tmbundle'...
remote: Counting objects: 3935, done.
emote: Total 3935 (delta 0), reused 0 (delta 0), pack-reused 3935
Receiving objects: 100% (3935/3935), 982.09 KiB | 347.00 KiB/s, done.
Resolving deltas: 100% (2007/2007), done.
Checking connectivity... done.
error: unable to create file Commands/Enclose in * (RDoc comments).tmCommand (In
valid argument)
error: unable to create file Macros/class .. < DelegateClass .. initialize .. en
d  (class).plist (Invalid argument)
error: unable to create file Macros/each_char { |chr| .. }  (eac).plist (Invalid
 argument)
error: unable to create file Macros/each_cons(..) { |group| .. }  (eac).plist (I
nvalid argument)
error: unable to create file Macros/each_slice(..) { |group| .. }  (eas).plist (
Invalid argument)
error: unable to create file Macros/map_with_index { |e, i| .. }  (mapwi).plist
(Invalid argument)
error: unable to create file Macros/require_gem "__".tmMacro (Invalid argument)
error: unable to create file Snippets/:yields: RDoc comment.tmSnippet (Invalid a
rgument)
error: unable to create file Snippets/Add '# =>' Marker.tmSnippet (Invalid argum
ent)
error: unable to create file Snippets/Array.new(10) { |i| .. }  (Arr).plist (Inv
alid argument)
error: unable to create file Snippets/Dir.glob("..") do |file| .. end  (Dir).pli
st (Invalid argument)
error: unable to create file Snippets/Dir["__"].tmSnippet (Invalid argument)
error: unable to create file Snippets/File.foreach ("..") do |line| .. end  (Fil
e).plist (Invalid argument)
error: unable to create file Snippets/File_open("__") { |file| __ }.tmSnippet (I
nvalid argument)
error: unable to create file Snippets/File_read("__").tmSnippet (Invalid argumen
t)
error: unable to create file Snippets/Hash.new { |hash, key| hash[key] = .. }  (
Has).plist (Invalid argument)
error: unable to create file Snippets/Insert ERb's <% __ %> or <%= __ %>.tmSnipp
et (Invalid argument)
error: unable to create file Snippets/all? { |e| .. }  (all).plist (Invalid argu
ment)
error: unable to create file Snippets/any? { |e| .. }  (any).plist (Invalid argu
ment)
error: unable to create file Snippets/class .. < DelegateClass .. initialize ..
end  (class).plist (Invalid argument)
error: unable to create file Snippets/class .. < ParentClass .. initialize .. en
d.plist (Invalid argument)
error: unable to create file Snippets/class .. < Struct .. initialize .. end.pli
st (Invalid argument)
error: unable to create file Snippets/class .. < Test;;Unit;;TestCase .. end  (t
c).plist (Invalid argument)
error: unable to create file Snippets/class << self __ end.tmSnippet (Invalid ar
gument)
error: unable to create file Snippets/classify { |e| .. }  (clas).plist (Invalid
 argument)
error: unable to create file Snippets/collect { |e| .. }  (col).plist (Invalid a
rgument)
error: unable to create file Snippets/delete_if { |e| .. }  (deli).plist (Invali
d argument)
error: unable to create file Snippets/detect { |e| .. }  (det).plist (Invalid ar
gument)
error: unable to create file Snippets/do |obj| .. end (doo).plist (Invalid argum
ent)
error: unable to create file Snippets/downto(0) { |n| .. }  (dow).plist (Invalid
 argument)
error: unable to create file Snippets/each { |e| .. }  (ea).plist (Invalid argum
ent)
error: unable to create file Snippets/each_byte { |byte| .. }  (eab).plist (Inva
lid argument)
error: unable to create file Snippets/each_char { |chr| .. }  (eac-).plist (Inva
lid argument)
error: unable to create file Snippets/each_cons(..) { |group| .. }  (eac-).plist
 (Invalid argument)
error: unable to create file Snippets/each_index { |i| .. }  (eai).plist (Invali
d argument)
error: unable to create file Snippets/each_key { |key| .. }  (eak).plist (Invali
d argument)
error: unable to create file Snippets/each_line { |line| .. }  (eal).plist (Inva
lid argument)
error: unable to create file Snippets/each_pair { |name, val| .. }  (eap).plist
(Invalid argument)
error: unable to create file Snippets/each_slice { |group| .. }  (eas).plist (In
valid argument)
error: unable to create file Snippets/each_value { |val| .. }  (eav).plist (Inva
lid argument)
error: unable to create file Snippets/each_with_index { |e, i| .. }  (eawi).plis
t (Invalid argument)
error: unable to create file Snippets/fetch(name) { |key| .. }  (fet).plist (Inv
alid argument)
error: unable to create file Snippets/fill(range) { |i| .. }  (fil).plist (Inval
id argument)
error: unable to create file Snippets/find { |e| .. }  (fin).plist (Invalid argu
ment)
error: unable to create file Snippets/find_all { |e| .. }  (fina).plist (Invalid
 argument)
error: unable to create file Snippets/grep(;pattern;) { |match| .. }  (gre).plis
t (Invalid argument)
error: unable to create file Snippets/gsub(;..;) { |match| .. }  (gsu).plist (In
valid argument)
error: unable to create file Snippets/inject(init) { |mem, var| .. }  (inj).plis
t (Invalid argument)
error: unable to create file Snippets/lambda { |args| .. }  (lam).plist (Invalid
 argument)
error: unable to create file Snippets/map { |e| .. }  (map).plist (Invalid argum
ent)
error: unable to create file Snippets/map_with_index { |e, i| .. }  (mapwi).plis
t (Invalid argument)
error: unable to create file Snippets/max { |a, b| .. }  (max).plist (Invalid ar
gument)
error: unable to create file Snippets/min { |a, b| .. }  (min).plist (Invalid ar
gument)
error: unable to create file Snippets/open("path;or;url", "w") do |doc| .. end (
ope).plist (Invalid argument)
error: unable to create file Snippets/partition { |e| .. }  (par).plist (Invalid
 argument)
error: unable to create file Snippets/reject { |e| .. }  (rej).plist (Invalid ar
gument)
error: unable to create file Snippets/require ".."  (req).plist (Invalid argumen
t)
error: unable to create file Snippets/require "tc_.." ..  (ts).plist (Invalid ar
gument)
error: unable to create file Snippets/require_gem "__".tmSnippet (Invalid argume
nt)
error: unable to create file Snippets/reverse_each { |e| .. }  (rea).plist (Inva
lid argument)
error: unable to create file Snippets/scan(;..;) { |match| .. }  (sca).plist (In
valid argument)
error: unable to create file Snippets/select { |e| .. }  (sel).plist (Invalid ar
gument)
error: unable to create file Snippets/sort { |a, b| .. }  (sor).plist (Invalid a
rgument)
error: unable to create file Snippets/sort_by { |e| .. }  (sorb).plist (Invalid
argument)
error: unable to create file Snippets/step(2) { |e| .. }  (ste).plist (Invalid a
rgument)
error: unable to create file Snippets/sub(;..;) { |match| .. }  (sub).plist (Inv
alid argument)
error: unable to create file Snippets/task :task_name => [:dependent, :tasks] do
 __ end.tmSnippet (Invalid argument)
error: unable to create file Snippets/times { |n| .. }  (tim).plist (Invalid arg
ument)
error: unable to create file Snippets/upto(1.0;0.0) { |n| .. }  (upt).plist (Inv
alid argument)
error: unable to create file Snippets/zip(enums) { |row| .. }  (zip).plist (Inva
lid argument)
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

can we have code folding for comment blocks?

I'd like to be able to use code folding on blocks of single-line comments (eg, "#...", "// ...", "-- ...").
I realize that the lack of a termination string makes this difficult in the current TM, but please
keep it in mind for the next one.

HTML(Rails) <% %> Error

As reported by slimGap to the Ruby on Rails tmbundle project, there is an issue with the 'Toggle ERb Tags' command.

When using HTML(Rails) and using the command 'shift-ctrl + >' to get <% %>.

/tmp/temp_textmate.g4XYXB:19:in /bin/bash: -c: line 0: unexpected EOF while looking for matching `''
/bin/bash: -c: line 1: syntax error: unexpected end of fileto_a' for "<%= %>":String (NoMethodError)

I get <%= %> ok, but then I get the above error on the attempt to change it to <% %>

This is with the latest tmbundle, ruby 1.9.2 and rails 3.0.0.beta3

Support regex comments

From the docs http://www.ruby-doc.org/core-1.9.3/Regexp.html

Comments can be included in a non-x pattern with the (?#comment) construct, where comment is arbitrary text ignored by the regexp engine.

... the x option enables free-spacing mode. Literal white space inside the pattern is ignored, and the octothorpe (#) character introduces a comment until the end of the line.

Broken Embedded Ruby

The embedded ruby shortcut (^> by default) now apears to work the first time but used to toggle between

<%= %>
<% %>
<%# %>
<%= -%>

Or potentially a different order. I think issue 36 maybe be part of the problem but can't find anyway after playing with git to go back to earlier to fix this. Currently ^> work as expected first time then inserts => for each click after (presumably the hash pointer command? )

Ruby1.9 scripts not detected as Ruby

In Ruby language detection the following line (Bundle Editor > Ruby > Ruby):

firstLineMatch = '^#!/.*\bruby\b';

should be changed to something like this:

firstLineMatch = '^#!/.*\bruby(1.9)?\b';

To detect shebang lines like "#!/usr/bin/env ruby1.9".

Validate Syntax (for ERb) shows wrong version

The Validate Syntax command (for ERb) is written in ruby and shows the version of the host interpreter (the ruby found via PATH) as the version used to validate the source.

The source however will be validated with the version of Ruby (ERb) specified using TM_ERB.

We are moving toward actually not suggesting users alter their PATH but only set TM_RUBY, TM_ERB, etc. to alter what version should be used (for user scripts).

The motivation is that by altering the PATH the user is also changing the version of ruby used for TextMate commands, and many of these have not been tested with ruby 1.9, ruby enterprise edition, etc.

Hash pointer snippet clobbers native TextMate shortcut: Ctrl-L

I think it's a mistake to clobber native TextMate keyboard shortcuts by default. Ctrl-L is a well established keyboard shortcut and while it's easy to change, it's still annoying to track down what's clobbering the shortcut and change it. Select Bundle Item helps, I know it's not difficult, but it has bothered me for years now so I thought I'd finally pipe up.

I propose using Ctrl-Shift-L instead.

https://github.com/textmate/ruby.tmbundle/blob/master/Snippets/hash%20pointer.plist

Segmentation fault in Textmate 2

This error is widely mentioned on the Web. Is it complicated to fix?

/Users/david/Library/Application Support/TextMate/Managed/Bundles/Ruby.tmbundle/Support/RubyMate/catch_exception.rb:15: [BUG] Segmentation fault
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.0.0]

-- Control frame information -----------------------------------------------
c:0004 p:---- s:0018 b:0018 l:000017 d:000017 CFUNC  :sub
c:0003 p:0170 s:0013 b:0008 l:0013a8 d:000007 BLOCK  /Users/david/Library/Application Support/TextMate/Managed/Bundles/Ruby.tmbundle/Support/RubyMate/catch_exception.rb:15
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:002208 d:002208 TOP   

-- Ruby level backtrace information ----------------------------------------
/Users/david/Library/Application Support/TextMate/Managed/Bundles/Ruby.tmbundle/Support/RubyMate/catch_exception.rb:15:in `block in '
/Users/david/Library/Application Support/TextMate/Managed/Bundles/Ruby.tmbundle/Support/RubyMate/catch_exception.rb:15:in `sub'

-- C level backtrace information -------------------------------------------

   See Crash Report log file under ~/Library/Logs/CrashReporter or
   /Library/Logs/CrashReporter, for the more detail of.

-- Other runtime information -----------------------------------------------

* Loaded script: /Users/david/dev/fisherman/extra/testing/tika_metadata_test.rb

* Loaded features:

    0 enumerator.so
    1 /Users/david/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.0.0/enc/encdb.bundle
    2 /Users/david/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.0.0/enc/trans/transdb.bundle
    3 /Users/david/.rbenv/versions/1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb
    4 /Users/david/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.0.0/rbconfig.rb
    5 /Users/david/.rbenv/versions/1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb
    6 /Users/david/.rbenv/versions/1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/exceptions.rb
    7 /Users/david/.rbenv/versions/1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb
    8 /Users/david/.rbenv/versions/1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems.rb
    9 /Users/david/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.0.0/pathname.bundle
   10 /Users/david/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/pathname.rb
   11 /Users/david/Library/Application Support/TextMate/Managed/Bundles/Ruby.tmbundle/Support/RubyMate/catch_exception.rb
   12 /Users/david/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/escape.rb
   13 /Users/david/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/cgi/core.rb
   14 /Users/david/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/cgi/cookie.rb
   15 /Users/david/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/cgi/util.rb
   16 /Users/david/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/cgi.rb

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

CMD+R Error on Textmate2

HI, there is an issue by running cmd+R on Textmate2

error log:
No web preview theme found.
Make sure that the Themes bundle is enabled in Preferences->Bundles

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.