Annoying If/Else behavior in SciTE

D

Drew Olson

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
 
D

David Vallner

--------------enig347E83FC6653FCE7E657A9F0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Drew said:
How should I adjust my properties to get this behavior?
=20

=46rom 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


--------------enig347E83FC6653FCE7E657A9F0
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)

iD8DBQFFSl1Qy6MhrS8astoRAgZ7AJ49rYRs7RpXEW9UycI6e1EiTqzR4ACfdWKT
mA6ViRGCW86SG+WxGRLjSmE=
=lJ6s
-----END PGP SIGNATURE-----

--------------enig347E83FC6653FCE7E657A9F0--
 
C

ChrisH

Drew said:
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/rbeautify.rb.html)
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,216
Messages
2,571,120
Members
47,724
Latest member
Farreach2565

Latest Threads

Top