[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Annoying If/Else behavior in SciTE

Drew Olson

11/1/2006 10:45:00 PM

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

--
Posted via http://www.ruby-....

2 Answers

David Vallner

11/2/2006 9:04:00 PM

0

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". 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 Vallner

Chris Hulan

11/3/2006 2:08:00 PM

0

Drew Olson 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
(http://www.arachnoid.com/ruby/rbeauti...)
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