views:

170

answers:

1

One of the things I like about Netbeans Ruby development is keyboard triggers.

For example, if you are in an erb template and you type:

licai

After you hit the tab key, this text gets replaced with:

<%= link_to "${1 default="link text..."}", 
:controller => "${2 default="items"}", 
:action => "${3 default="edit"}", 
:id => ${4 default="@item"} %>

And then you can use the tab key to fill out each of the arguments.

I'm evaluating RadRails and I really miss this feature from Netbeans.

Is there anything similar in RadRails?

+1  A: 

Yes, look under Window | Preferences and then Ruby -> Editor -> Templates to see the existing list of code templates that have been defined or to add your own.

Then the keyboard shortcut you want is Control+Space e.g. type "render" and press Control+Space to see the list of render templates.

mikej