Libin Pan

One post at a time

Coda 1.5 entering limited private beta

One of my favorite editor on Mac is Coda, the most important part for me is in their tagline:

Compare with my another favorite editor, TextMate, every time I open it, I will open three more windows at the same time:

  • Terminal for running application
  • Terminal for mysql
  • Browser for view my pages and documents

Coda has all of these and even more:

Text editor + Transmit + CSS editor + Terminal + Books + More = Whoah.

But, on another side, leaking of version control and no powerful bundles as TextMate keep a lot of Ruby developers out of it.

Things may change:

After a lot of work, we’re finally ready to work with some people to test Coda 1.5 — the next major release of Coda — and prepare it for the general public.

To enter Coda 1.5 limited private beta, go to:
http://www.panic.com/hive/
If registration is still available, the registration link will be in the upper-right corner of the page. (If there’s no link, we’re full.)

So what’s new in Coda 1.5?

  • Better Search and Replace?
  • Source Control Support (SVN or Git)?
  • Custom Books? Add more Ruby Document in it?
  • Better Support for more than one languages mix together in one file?

Stay tuned. :)

* Unless you want to use more than one window. Which is totally cool.

Keyboard navigation for TextMate stacktraces

Put this script at the end of /Applications/TextMate.app/Contents/SharedSupport/Support/script/webpreview.js.

document.addEventListener('keypress', function(e){
    var key = e.keyCode
    if (key != 63233 && key != 63232) return
    links = document.getElementsByTagName('a')
    for (var i = 1; i < links.length; i++)
        if (links[i].title == 'focused') break
    if (i == links.length) i = 0
    links[i].title = null
    if (key == 63233){
        if (i == (links.length - 1)) i = 1
        else i += 1
    }
    if (key == 63232){
        if (i <= 1) i = links.length - 1
        else i -= 1
    }
    links[i].title = 'focused'
    links[i].focus()
})

Incredibly useful when I am running my tests!

(Re)Enable TextMate Ruby Bundle

We all love TextMate, by all means. It is the best friend for Ruby Developers.

After our project upgraded to Rails 2.0+ at LearnHub.com, I noticed that there are some very powerful Ruby Bundle Commands just stopped working. Especially these two:

  • Run Focused Unit Test

This is an awesome lovely command in Ruby Bundle, absolutely my favorite! It allows you to run a single unit test out of a whole suite of tests by simply positioning your cursor into the test you’d like to run.

  • Run Rake Task

This is another cool command too. It shows a popup window which list all the available rake tasks you have and it will show a pretty HTML result window after you choose from the list.

This thing really bothers me a lot. I could be fine for the second one, as I do have terminal windows open all the time. But I really really miss the first one, as our test files get longer very soon.

I have to make it work!

After couple of hours trying today, I’ve pretty much got the right reason and the simple solution, for now.

The reason is that TextMate includes its own version of builder.rb, which is conflicting with Rails 2.0′ version of builder.rb.

The simple solution:

  1. Open TextMate Bundlers Editor
  2. Find Ruby -> Run Focused Unit Test
  3. Search for RUBYLIB=”$TM_BUNDLE_SUPPORT/RakeMate${RUBYLIB:+:$RUBYLIB}”
  4. Change to RUBYLIB=”$TM_BUNDLE_SUPPORT/RakeMate”
  5. Reload Bundlers

That’s it! And apply the same changing method to other commands such as “Run Rake Task” as well.

And just want to point out the alternate solution is:

mv /Applications/TextMate.app/Contents/SharedSupport/Support/lib/Builder.rb /Applications/TextMate.app/Contents/SharedSupport/Support/lib/Builder.rb.bak

It’s up to you to choose one of them.

Hope Google can pickup this post quickly so we can save somebody else sometime too. :)

Enjoy!

  • 3 Comments
  • Filed under: English, Mac, Ruby, Software
  • Upcoming Events

    Pages