[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Annoying If/Else behavior in SciTE

Gavin Kistner

11/2/2006 9:19:00 PM

From: David Vallner [mailto:david@vallner.net]
> Drew Olson wrote:
> > How should I adjust my properties to get this behavior?
> >
>
> From a cursory glance at ruby.properties, the SciTE autoindentation
> seems rather rudimentary and only supports things like "indent line
> after seeing these words in token stream".

While this is true, if you open a new SciTE document (without saving it
as a .rb file and thus letting SciTE treat it as Ruby syntax), the OP's
if/else/end statement indents correctly. It's only once you go into Ruby
mode that it gets confused about how to indent.

So (I suppose) there ought to be a setting to change the indentation in
Ruby to act like it does in 'normal' mode.

1 Answer

David Vallner

11/2/2006 10:49:00 PM

0

Gavin Kistner wrote:
> From: David Vallner [mailto:david@vallner.net]
>> Drew Olson wrote:
>>> How should I adjust my properties to get this behavior?
>>>
>> From a cursory glance at ruby.properties, the SciTE autoindentation
>> seems rather rudimentary and only supports things like "indent line
>> after seeing these words in token stream".
>
> While this is true, if you open a new SciTE document (without saving it
> as a .rb file and thus letting SciTE treat it as Ruby syntax), the OP's
> if/else/end statement indents correctly. It's only once you go into Ruby
> mode that it gets confused about how to indent.
>
> So (I suppose) there ought to be a setting to change the indentation in
> Ruby to act like it does in 'normal' mode.
>

You could comment out the lines in ruby.properties for the
statement.indent and statement.end options and handle indentation
yourself. Or retrain your fingers to the Pythonesque
backspace-on-block-end method.

David Vallner