Luis Lavena
12/28/2007 5:20:00 PM
On Dec 28, 1:24 pm, "Ken A." <ken.awam...@gmail.com> wrote:
> Hi. I managed to set auto_indent, but it just don't work quite the way
> we expect, at least in Windows. eg, in irb console I type:
>
> def my_method
> a = "some text"
> end
>
> but I need (visually speaking)
>
> def my_method
> a = "some text"
> end
>
> Can I fix it? or it's a limitation on Windows?
No, is a IRB limitation.
There is no way "in advance" that IRB understand that you're doing
'end' and it should be indented one level lower than previous
indentantion.
IF tricky, adding something like that can create problems with users
just doing:
def foo; "bar"; end
and IRB trying "as you time" to reindent the code...
I'll suggest you code in some IDE, like Komodo or NetBeans that
automatically indent your code.
HTH,
Luis