Monday, June 1, 2009

TextMate-like shortcuts in Netbeans

Netbeans has template completion via the tab key. By default, you can hit the letter l and then tab, and bam, a Hash rocket (=>). I know this feature in a similar fashion from TextMate, although I don't know if this is where the shortcut originates.

In Netbeans it's very easy to define your own templates. There are lots of pre-built ones for Ruby which I haven't had time to play with yet. To view/edit these templates, they can be found in Preferences/Options->Editor->Code Templates and pick Ruby as the language (if you got the Ruby only bundle, this should be selected already).

If there are other useful TextMate shortcuts/expansions, I'm sure they could be added pretty easily if they aren't there. Since Netbeans is open source, there's little to stop recovering TextMate addicts from submitting some config files with the additions.

I've recently picked up Netbeans 6.7 RC1 and will be actively using it for my JRuby/Ruby projects. So far this has been a pretty easy ride for a Netbeans Release Candidate. I hope to play around with the project Kenai integration which is a shiny new feature.

0 comments:

Post a Comment