GithubHelp home page GithubHelp logo

ruby-tmbundle's Introduction

Ruby TextMate bundle

The TextMate bundle that first appeared in the famous "Rails 15 minute video." This is it, many years later.

Installation

To install via Git:

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

Source can be viewed or forked via GitHub: http://github.com/drnic/ruby-tmbundle

Validate and Save

When you save a Ruby file, it will first validate the syntax and print any validation error as a tooltip.

Validate and Save - No Rubinius

You can get more detailed syntax error information if you have Rubinius installed (and rbx in TextMate's $PATH).

Validate and Save - Rubinius installed

If you have Homebrew installed:

brew install rubinius

Then in TextMate, add your homebrew bin folder to the $PATH.

  • Go to TextMate's Preferences (Cmd+,)
  • Go to "Advanced", then "Shell Variables"
  • Edit the PATH variable, and add ":/path/to/homebrew/bin"

For example, if you have homebrew installed in ~/.homebrew then you might add :/Users/drnic/.homebrew/bin

Save a dodgy Ruby file and see the beautifully helpful syntax message.

ruby-tmbundle's People

Contributors

alexandre-butynski avatar arya avatar bjeanes avatar drnic avatar ebeigarts avatar radar avatar tinogomes avatar weppos 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

ruby-tmbundle's Issues

Needs update form Ruby 1.9.2

Looks like there's a few different errors preventing this awesome bundle from working on Ruby 1.9.2.

I am getting a no method error in run_script.rb (str.map vs. str.chars.map) and also several warnings with the regex patterns on lines 46 and 49. I think there's a few other issues as well but not certain.

Does the encoding have to be declared in those files?

How to disable syntax errors on save

How can I disable the ruby validation/syntax errors on save? I would almost have this featured disabled by default and then just make it clear how to enable/disable it.

Thanks!

CMD-S w/ validate crashes textmate

Occasionally the CMD-S w/ validate freezes textmate.

I see the beach ball spinner of death and I am forced to quit textmate.

Rubinius (rubinius 1.0.0 (1.8.7 release 2010-05-14 JI) [x86_64-apple-darwin10.3.0]
Ruby.tmbundle (a26d8dc - Added image examples...)

Thanks,
Adam

Inconsistent single quote expansion inside of double quotes

Inside of single quotes, double quote expansion works as you'd expect: A pair is always formed; if you select text, then double quotes are formed around it.

Now try typing

"#{foo}"

If you place the cursor at the end of the string and type ', you get one single quote:

"#{foo}'"

If you place the cursor at the start of the string and do the same, you get two:

"''#{foo}"

And if you select anything inside of the string (outside of the interpolation), the ' you type simply replaces what you've selected:

"'"

But within the interpolation, single quote expansions work as you'd expect:

"#{'foo'}"

The behaviors are identical with backticks (`) as well.

None of these behaviors is so bad in and of itself, but the inconsistency is annoying. I'm guessing that it's the result of someone overthinking a bit—what's the behavior supposed to be if a selection includes part of an interpolation when someone hits '? But that's an edge case (the selection was probably made by mistake); a much more common case is when you want to surround an interpolation with single quotes:

"You typed '#{input}'."

Right now, doing that common operation takes not one keystroke, not two, but at least three—one to put a pair of single quotes in front of the interpolation, another to delete half the pair, and another to add a single quote after it.

I think it would be a great improvement to simply expand all single quotes (and backticks) typed inside of double quotes, the way that double quotes are always expanded inside of single quotes.

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.