Need Ruby Text Editor Suggestions

| | Comments (20)

One of my students is using Smultron and the more I poke at it (about an hour now), the more I hate it. Despite claiming to support ruby, it doesn't have really simple features I've come to expect like "reindent code". So, are there any suggestions for ruby text editors. Minimum requirements would be:

  • Mac OS X
  • GUI, preferably w/ tabs
  • Free (yes, that means TextMate is right out).
  • Easy to set up (preferably NO set up, that excludes vim and emacs)
  • actually knows ruby, meaning:
    • syntax highlighting
    • can navigate to classes/modules/methods easily
    • knows what the indentation should be and can reindent

(tho, now that I think about it, I should find a good editor for windows as well, those guys seem to have the same pain)

Edited to Add:

Apparently when you bring up a religious argument like text-editors it is free license to not bother reading what one is actually asking. To clarify:

  • textmate: not free
  • macvim: requires setup to be halfway usable. worse, it is a patently horrible UI.
  • jedit: latest doesn't even launch, stable pretends to have reindent, but it doesn't work in the slightest... worst "mac" app ever, nothing about it conforms to the usual osx experience.
  • komodo edit: doesn't have reindent or navigation (that I could find). it obviously should know how, it marks appropriate fold points... but yeah. not usable.
  • textwrangler: again... no reindent. how hard is reading before suggesting?
  • aquaemacs: you're suggesting something you've never used??? C'mon...

xcode... actually got the closest, but it's reindent has a bug:

class X
  def x
    if y then
      42
      else
      24
      end
    end
  end

20 Comments

For people unwilling to learn either Vim or Emacs I generally recommend Komodo Edit; it's OSS, cross platform, easy to setup, and has pretty nice features.

Sorry, make that http://macromates.com/ -- now with proper tld and without a period at the end.

It's not like I read that you don't want textmate or anything. Nailed that one!

I think MacVim covers most of your bases.

http://code.google.com/p/macvim/

Isn't a "proper TLD" always followed by a period? ;)

A good editor for Ruby, except for the three best editors for Ruby... Hmmmm

What about XCode? jEdit?

Scite works on Win and various flavours of *nix. I use it all the time.

--R

Have you tried TextWrangler? It should be pretty much what you're looking for.

http://www.barebones.com/products/textwrangler/

http://aquamacs.org/ might be helpful. Never used it.

Sorry, thought Komodo Edit had re-indent. As for navigation... yeah, I overlooked that requirement. I think Netbeans meets all the requirements (actually fired it up to check this time), but it's more of an IDE than an editor.

I used to edit Ruby with emacs, and by default it dropped into Matz's old ruby-mode, which isn't terrible, whenever you edited a .rb. So I guess in this case your FAIL on "Easy to set up" refers to Emacs in general, not anything Ruby specific. Well, OK. Bear in mind that this would however improve your students' studliness.

Anyhow, now I use NetBeans. This could be your cue to flame, first at me for being a corporate drone, and second at NetBeans for being written in Java. But it's quite a bit nicer than Emacs for Ruby. I think it hits all your bullet points. Plus it knows a lot about popular libraries so you get autocomplete and some other IDE goodies. Indentation at least as good as Emacs and there's a "reformat" command. It's a real Mac app, I'm pretty fussy about that. No, not just JRuby, I'm actually not using any JRuby right at the moment. Nice & snappy on my BlackBook.

Downside: even the "Ruby only" download of NetBeans is 58M.

A friend of mine uses NetBeans on Windows (the Ruby bundle) and likes it a lot. It has some sort of auto-completion and other nifty features. You can read about it here: http://www.netbeans.org/features/ruby/index.html

So this is not a personal recommendation (I use Emacs myself), just a hint.

CarbonEmacs or Emacs.app built from MacPorts. I'd avoid AquaMacs, it is as closely related to emacs as OS X is to FreeBSD.

To be honest, you either need to plop down the $30 and buy TextMate or stop complaining and use vim or emacs.

1) it's $50. 2) they're students. 3) no.

I personally dig TextMate as well, but if you have to go free, Netbeans' ruby support is pretty much the best I've seen. The context completion is ok, but I usually find it to be more of a hindrance.

The only downside I see is that on OSX it feels a little odd, Swing on OSX never quite gets the interface right.

++ on netbeans.

Yes it is an ide (wrote that as ied hmmm) but it is easy to ignore all that stuff and has a real nice reformate text function. There is a plugin that add a nice dark background theme.

A (partial) solution.

Give your student the following assignment:

  • write a Ruby indentation routine in Ruby
  • assign it to a key in Smultron's command panel

(She or he will still be missing navigation to modules, classes).

netbeans is reasonable, or textwrangler

Leave a comment

About this Entry

This page contains a single entry by zenspider published on November 21, 2008 11:34 AM.

Flay detecting identical and similar code was the previous entry in this blog.

Made my Day is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.32-en