Re: Annoying If/Else behavior in SciTE

From: David V. [mailto:[email protected]]

Drew O. 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.

Gavin K. wrote:

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 V.