views:

233

answers:

2

I've been using Netbeans for Rails and like it a lot, considering how little I paid for it. But something that bothers me is that when I'm editing an RHTML or ERB file, it doesn't do the code autocomplete - or at least not reliably. Sometimes it shows the appropriate variables and methods that are available on an object after you type the dot operator. Sometimes it ignores the instance variables. Is there a solution for this? (Please don't say RadRails).

Oh and one more thing in case anyone has solved this: considering how often I have to type <% when I'm in a Rails template, I wish there was some hotkey for autotyping the tag . . . ? I always have to stop and look down at my keyboard to find the < and % keys before I can type the tag so it's not as trivial as it might sound.

+4  A: 

I believe you're looking for something like this:

http://ruby.netbeans.org/codetemplates-rhtml.html

Type in one of the triggers, then hit the tab key to expand it to the code as given.

Wesley
These shortcuts are amazing! I figured there had to be something like that but couldn't find it. Thanks!
cambra
No problem; enjoy \m/
Wesley
A: 

Also, you might want to explore using HAML. It's much easier on the hands.

Tamer Salama