[TxMt] Re: Textmate Junkie, Ruby and Rails noob

Rick DeNatale rick.denatale at gmail.com
Thu Dec 31 21:06:30 UTC 2009


On Thu, Dec 31, 2009 at 3:13 PM, David Clark <david at davidsaccess.com> wrote:
> I  have been using (and loving) textmate for years - mostly for html, php,
> and some text manipulation.
> I  have all kinds of bundles installed,  and think I  understand the issue
> of scope... maybe..   Like,  when i'm editing a php file, I  still have the
> scope set to html so that I  still have all my commands, be it from zenhtml,
> mhtml, php, etc or the ones I  cant live with out - shift-ctrrl-w  (wrap
> selection in tag).
> i'm now starting to work in ruby and rails - and I  have 2 questions:
> 1. are the ruby and ruby on rails bundles redundant or should I  have both?

You want both. The ruby bundle provides support for the ruby language,
the ruby on rails bundle adds extensions for rails.

> 2. The bigger question - when editing ruby files it does not appear that I
>  have access  to the commands i'm familiar with (see above)
> thanks for any and all pointers

For ruby files, wrap selection in tag really doesn't make sense.
Unlike php, which is really html with some extensions to turn it into
a programming language, rails has a much stronger notion of separation
into models, controllers and views, the first two are pure ruby code,
and the last is some form of html with embedded ruby, or can be in
other forms like haml for those who prefer.  If you're comfortable
with PHP, then Ruby embedded in html via erb is probably the best
starting choice.

The Rails bundle should recognize html and html.erb files and you will
have access to x/html commands like wrap selection in tag when editing
those files.

-- 
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale



More information about the textmate mailing list