Annoying If/Else behavior in SciTE

Currently, when using SciTE, my if/else statements are formatted like
so:

if (x > 0)
y = 1
else
z = 2
end

I’d like it to look like this:

if (x > 0)
y = 1
else
z = 2
end

How should I adjust my properties to get this behavior?

Thanks,
Drew

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”. If you want smart formatting,
I’d recommend a more powerful editor like vim, Emacs, jEdit, SciTEs
qualities are on the “lightweight” side of things to serve as a config
file touchup editor, or to make quick fixes to stuff.

There is a version of SciTE that ships with Artistic Style, but I’ve no
idea how that program or SciTE’s integration therewith works.

David V.

Drew O. wrote:

Currently, when using SciTE, my if/else statements are formatted like
so:

How should I adjust my properties to get this behavior?

I get the impression to get smarter behavior you’d have to implement a
Ruby lexer.

I like to use a simple reformat script
(Ruby Beautifier Script Listing)
Add it to the tool menu for ruby and it seems to work well. Have to
configure Scite so it checks for file changes and will reload (it
prompts for reload) after the format changes are made

Cheers