TextMate for Rails development -- why?

Greetings,

I am curious, I see quite a few references to using TextMate for
rails development. I downloaded TextMate and used it for 30 days. I
do not see what everyone is raving about. Snipplets are nice, but
other editors do the same thing, some with much more power.

Can anyone tell me what makes people draw to TextMate? Maybe I am
missing the whole reason, I’d really like to find an editor better
than the one I am using, one that makes me more efficient and get
things done quicker, for that reason, I’d like to know what I missed?

Thanks,

Jeremy
http://lifewithchrist.org <— being rewritten in RoR

I think its because its a nice Mac-like GUI with a shell-oriented
expandibility that attracts many people. You can easily develop highly
efficient workflows tailored to the way you develop your application.
Plus it comes with lots of useful bundles including the rails
snippets. It certainly is not for everyone. Even for me personally
while I recognize its power and generally like it I probably don’t
capitalize on it nearly enough to make up for some things I miss in a
tool with an integrated graphical debugger, like Arachno.

On 3/29/06, Jeremy C. [email protected] wrote:

things done quicker, for that reason, I’d like to know what I missed?


Jeremy H.

I have just found it to be the best one. The autocomplete/snippets are
maybe something other editors do as well but I found TextMate to be
the best. The shortcut to close the tag saves me loads of time. And
the ability to open directories into project from shell is just great.
And I can’t say how much time it saves me to be able to drag js, css
or other types of files into the code and it automatically creates the
include tag. Selecting text and pressing the quotes tag to encircle it
is great.

It’s just the total numbers of those nice little things. And yet still
manage to be simplistic, stylish and fast.

But what editor has more powerful snippet system?

On 3/30/06, Jeremy C. [email protected] wrote:

things done quicker, for that reason, I’d like to know what I missed?

On Mar 29, 2006, at 4:06 PM, Jeremy C. wrote:

I am curious, I see quite a few references to using TextMate for
rails development. I downloaded TextMate and used it for 30 days. I
do not see what everyone is raving about. Snipplets are nice, but
other editors do the same thing, some with much more power.

Much more power? Do tell…

I’m not particularly arguing, but I’d love to hear how you
judge the “power” of a text editor.

Can anyone tell me what makes people draw to TextMate? Maybe I am
missing the whole reason, I’d really like to find an editor better
than the one I am using, one that makes me more efficient and get
things done quicker, for that reason, I’d like to know what I missed?

Small, fast, cheap, live file browser (with creation and renaming)
and well supported, particularly so for Rails:

http://blog.oaklandcutlery.com/articles/2006/01/12/tddmate
http://blog.inquirylabs.com/2006/02/11/textmate-backtracer-10/
http://feldpost.com/lighthaus/textmate_rails.pdf
http://syncpeople.com/downloads/syncpeople_on_rails_features


– Tom M.

But what editor has more powerful snippet system?

emacs?

The point with Textmate isn’t just that it “has a snippet system” - it’s
that it has great Ruby/Rails support out of the box. You could easily
make
emacs behave in a similar way, but you’d need to code it up yourself.

Regarding snippets: I don’t really see what “extra power” you’d need in
a
text editor for rails. Other things that it has bar snippets: a really
impressive live html view, decent macro recording, very accurate code
highlighting, code folding, the command-T “jump to file” function, great
support, great pricetag.

On the Mac, BBEdit used to be editor of choice. BBEdit is very good -
and
it’s also $200.

Textmate is â?¬39, which is an absolute steal. It also has a great support
community.

In short: it feels right. Bar for pure XHTML/CSS and PHP (for which I
still
prefer skEdit) I do most writing and coding in Textmate. It’s a great
product - and it has undergone staggering development since its
original,
cranky versions.

I am curious, I see quite a few references to using TextMate for
rails development. I downloaded TextMate and used it for 30 days.
I do not see what everyone is raving about. Snipplets are nice,
but other editors do the same thing, some with much more power.

Much more power? Do tell…

Well, Vim has just as much power in snipplets and Emacs does
everything TextMate does in snipplets plus gives you the ability to
run lisp code in certain portions of your snipplets opening up a
whole host of things that can be done.

I’m not particularly arguing, but I’d love to hear how you
judge the “power” of a text editor.

One thing I really like in editors is the ability to record temporary
keyboard macros, ease of extendibility (Vim is programmable in ruby),
quickly move around your source w/keyboard.

Things like:

def say_hello(^name, to_who)

^ = cursor, to change those params, I say ct) … change to ) …
zaps everything, and I start typing. Or, I want to copy say 3 lines
of code in an if statement that I am going to move to it’s own
function, 3dd. ([{}]) “’’” can all be auto-inserted/ended. I can
bounce between View.rhtml and View function in controller very
easily, etc… There are all sorts of things that helps me to decide
what makes a powerful editor. When editing html/rhtml files, Vim
makes it very easy.

upon inserting the >, vim ends the tag for me. If I want Start Typing here.

I simply

> … on the second > it deletes it, then adds/indents a
blank line and puts your cursor there.

When I am in a line, say, ^if a = 1 and b = 2 or c = 5 … and 5
should be 3, not 5, I simply do f5r3 … find 5, replace 3. Now, that
f command can be used for a whole host of things.

I could go on for the next five years saying things that make life
easy as a programmer in Vim and or emacs. Another one I love is the O
and o … I could be midline and want to start a brand new line on
top or bottom, I hit o, and vim goes to the end of the line, then
creates a new line. or O goes on top of the current line (no matter
where the cursor is) and starts a new line. Anyway, I should stop w/
these type of command discussions, but just showing what I think
makes a powerful editor.

I like to always see my code in context, when you scroll to the
bottom of the screen in most editors, your at the bottom of the
screen and you only see what’s above your code, you have no idea
what’s coming next. Well, powerful editors let you set them up how
you want to work. In vim, I added set so=4 which shows always 4 lines
of code around where I am. In that case, I will never get to the
bottomo of the screen, I get w/in 4 lines, and text starts scrolling
so I always see my code in line context.

Ok, really have to stop, you guys are probably bored already.

Can anyone tell me what makes people draw to TextMate? Maybe I am
missing the whole reason, I’d really like to find an editor better
than the one I am using, one that makes me more efficient and get
things done quicker, for that reason, I’d like to know what I missed?

Small, fast, cheap, live file browser (with creation and renaming)
and well supported, particularly so for Rails:

Vim = Small, fast, free. It does have a live file browser that I
don’t care for, so I always have a finder window w/no toolbar, etc…
in tree view so I can have the same thing as TextMate (one thing I
did like about TextMate), but the tree view gives me the same power.

Jeremy

2006/3/30, Jeremy C. [email protected]:

I could go on for the next five years saying things that make life
easy as a programmer in Vim and or emacs. Another one I love is the O
and o … I could be midline and want to start a brand new line on
top or bottom, I hit o, and vim goes to the end of the line, then
creates a new line. or O goes on top of the current line (no matter
where the cursor is) and starts a new line.

Sounds slightly shorter than in TextMate (it uses the standard OS X
Apple-Right arrow and Apple-Left arrow to go to the start and end of
lines) though at the expence of being able to click on some text and
edit it…

Dose Vim support anti-aliasing?

Douglas

I use the vim built using Cocoa widgets, so yes. Bear in mind, I’m
not trying to sell Vim, I am just trying to figure out if I have
missed things in TextMate. Didn’t mean to turn it into a Vim
conversation (that’s why I didn’t mention another text editor in the
original email).

Jeremy

Sounds slightly shorter than in TextMate (it uses the standard OS X
Apple-Right arrow and Apple-Left arrow to go to the start and end of
lines) though at the expence of being able to click on some text and
edit it…

Dose Vim support anti-aliasing?

Anti-aliasing? Yes, for gui on the Mac.

Vim also supports horizontal and vertical split windows, editing
sessions (so you can open up your files and windows later), remote
sessions (so, for example, if you’ve got a Vim session going on your
machine at work, you can access it from home), network reading and
writing via rcp, rsync, sftp, scp, ftp, fetch, etc., programmability
via its own scripting language or also Perl, Python, or Ruby (options
need to be compiled in), folding based on syntax, indentation,
expressions, or manual cues, and dozens and dozens of pre-made color
themes.

It supports multiple languages, including Arabic (doesn’t come up
often for me, but hey, it might be useful to someone here), has an
extremely active community and a ton of plugins for various things
like Java development, Python development and, yes, Ruby development.

One important note, too, is that Vim is in both gui and terminal
versions, so if you’re editing on the console via ssh, as an example,
you can still use the editor you’re used to even though you don’t have
a gui, and, via a config file, you can do so with all of your favorite
customizations which don’t involve the gui …

This is a very incomplete list. I’ve been using Vim for seven years
and I kind’ve chuckle a little whenever the latest, greatest text
editor hits the scene. I’ve seen TextMate. It’s an excellent product,
very polished, very nice, and anyone who uses it has a formidable tool
in the arsenal. But it ain’t Vim and it ain’t Emacs, and until you’ve
used either one of those Granddaddy Editors long enough to get some
proficiency under your fingers, then you just don’t understand the
power. With those editors, you’re limited by your imagination and
skill in how to work within the environment, not by a featureset.

That said, even with all the features above, neither Vim or Emacs are
nearly as easy to learn as TextMate, not even close. If you do learn
one of them, you may fumble for awhile wondering what the big deal is
all about. But it’s worth it, if text editing in some form,
programming, whatever, is your livelihood for some time to come, it’s
worth it.

FWIW, I’m enjoying this discussion. I always find it interesting to
see how other people are using tools. There were a couple of items
you mentioned that I’ve never really tried to streamline.

Sometimes we forget that editors are a powerful tool. I think someone
posted something a while back about most people approaching an editor
and just using it for copy/paste stuff like that, or for the wow
factor. But, if you really spend some time (and for some editors the
learning curve can be longer than others) learning the tool and
adapting it to your work environment, then most of the notable ones
(i.e vim, emacs, textmate, jedit, etc… ) will do what you need them to do.

Michael

+1 on all the VIm posts.

It is truly powerful, and everywhere. It will be hard for you to find
a
box you log into that doesn’t have VIm.
The only thing that has bugged me was the anti-aliasing… and now that
I
know it exists, I’m dancing.

… dancing, dancing, dancing

Textmate’s power is actually much more hidden than you might expect
from your standard GUI editor. Thus, it may be worth to at least scan
thru the manual if you want to get a sense of all it’s “hidden”
features. As others have said, along with the Syncpeople Rails-
Bundle, there’s no better platform for Rails development.

Textmate might still have a bit to go in terms of maturity, and
probably needs split-view, sftp support, better project drawer and a
few other things. But it’s creator is one of the hardest working
people around, so i’m sure it won’t be long for these things to appear.

sebastian

I think the biggest reason I like it is that it integrates into the
Shell. I can update MySQL right from TextMate because It has project
specific environment variables. I even have a global keyboard
shortcust (Shift-Control-Option-Command + A) that opens my entire
apache 2 conf directory, see blow. A simple (Shift-Command-Option +
A) restarts my apache for me.

#Opens apache2 conf dir from its default location in OS X using
Darwin Ports.
open -a textmate /opt/local/apache2/conf

Since text mate is integrated with the shell, I can run just about
any script from it and even have it show me man pages (Control H). If
you work in PHP Ctl-H will get you documentation on their site, if
you are editing an Apache conf Ctrl-H will get you help at Apache’s
site, better yet, with Ruby and TextMate’s hooks into RI, you can
validate code and get help for it to.

Now if I could only figure out how to hook TextMate to the API for
RAILs. Anyone?

http://www.metaskills.net/blog/heuristics/conventions/textmate-by-
programmers-for-efficiency-experts

  • Ken

It’s the official Rails text editor! Nuff said!!!

Personally, I’m interested in TextMate. When I get a Mac, I’ll
definitely check it out. Ever since I read “The Pragmatic Programmer,”
I’ve been wanting to get away from vi(m) just because it’s what I’ve
been using for about ten years. Your habits can’t get too familiar or
they’ll be stale.

I’m really a text-editor guy more than an IDE guy, but the VisualWorks
Smalltalk IDE is the coolest IDE I’ve ever seen. It’s almost
incredible. My grasp of Smalltalk is utterly clumsy, but I can say
with confidence that IDE puts every other one I’ve ever seen to shame.
However, it still lacks the key-navigation and general swiftness of
vi, afaik, and this is probably doubly true if you’re an emacs guru.

(Eclipse is apparently a port of a product originally developed for
and in Smalltalk, but as I said, the IDE for VisualWorks Smalltalk
totally puts it to shame. More so when you compare speed. Smalltalk
has a much smaller community than Java with much less overall
corporate funding, so the performance of Eclipse seems really almost
inexcusable.)


Giles B.
www.gilesgoatboy.org

(actually that bit abt corporate funding was dumb, forget I said that,
but the rest of it I can stand by.)

On 3/30/06, Giles B. [email protected] wrote:

However, it still lacks the key-navigation and general swiftness of
Giles B.
www.gilesgoatboy.org


Giles B.
www.gilesgoatboy.org

On 3/29/06, Jeremy C. [email protected] wrote:

things done quicker, for that reason, I’d like to know what I missed?

Thanks,

Jeremy
http://lifewithchrist.org <— being rewritten in RoR

Without starting another java vs ruby flame fest, I think this post
has a thoughtful comparison of Textmate with IntelliJ IDEA - at least
for HTML/CSS development.

http://blogs.opensymphony.com/plightbo/2006/03/teaching_mr_rails_a_lesson_on.html

On 3/30/06, Giles B. [email protected] wrote:

Personally, I’m interested in TextMate. When I get a Mac, I’ll
definitely check it out. Ever since I read “The Pragmatic Programmer,”
I’ve been wanting to get away from vi(m) just because it’s what I’ve
been using for about ten years. Your habits can’t get too familiar or
they’ll be stale.

Huh??? Can you explain that statement? Because I’m probably
misunderstanding what you’re saying.

Michael

You want the productivity of being very fluent in a given tool, but
there’s also value in being able to accomplish the same task with more
than one tool. Getting locked into one way of doing things makes you
incapable of adapting; being weak with editors makes you slow. So, if
you’re good with vi, you’re probably also using it as a crutch to some
extent, or at least, strengths you might develop if you weren’t good
with vi are never necessary for you, and blind spots are the result.
Any editor or IDE embodies a way of doing things, so they all have a
specific philosophy or method which enhances productivity in certain
ways, but they also shape the way you look at problems. (When you have
a hammer every problem looks like a nail.) You want to be able to use
those methods fluently without being so locked into them that you
can’t think outside the boxes each one represents. vi is a power tool,
but it’s also a box to think outside; the same is true of TextMate,
emacs, Rails itself, yadda yadda yadda. The best situation is when you
can use each power tool without ever getting trapped in any box.

I hope that made sense…

On 3/30/06, Michael T. [email protected] wrote:

Michael


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Giles B.
www.gilesgoatboy.org

On Mar 30, 2006, at 2:23 PM, Michael T. wrote:

On 3/30/06, Giles B. [email protected] wrote:

Personally, I’m interested in TextMate. When I get a Mac, I’ll
definitely check it out. Ever since I read “The Pragmatic
Programmer,”
I’ve been wanting to get away from vi(m) just because it’s what I’ve
been using for about ten years. Your habits can’t get too familiar or
they’ll be stale.

Huh??? Can you explain that statement? Because I’m probably
misunderstanding what you’re saying.

Giles spoke well for himself, but I have a more terse way of explaining
what I thought he meant:

“Learning is good!”


– Tom M.