indent for Ruby, to reformat it

J

jussij

I'm writing a Ruby script and I'm too lazy to type
the indentations and linefeeds correctly.

The Zeus for Windows IDE will do auto-indenting.

It also does things like Ruby syntax highlighting, code
folding etc, it also has a code templates feature which
makes it possible to semi-automate things like for/while
coding constructs:

http://www.zeusedit.com/forum/viewtopic.php?t=40

Note: Zeus is shareware (45 day trial).

Jussi Jumppanen
Author: Zeus for Windows
 
F

Forrest Chang

Phlip said:
Sorry - Emacs is the devil I /don't/ know. ;-)

Hi Phlip:

Not so hard really, if you add 3 lines to your init file ( I seem to
recall xemacs giving Ruby support out of the box for me when recently
moving to a different platform), you can automatic Ruby support. Then
you can use arrows, menu entries to drive w/o needing to know all the
various keystrokes (though they really pay off). I find the general
emacs indenting options pretty handy and flexible.

You can indent any single line by simply moving the cursor to the line
and hitting tab, but you can change this to indent the line if at the
beginning of the line, and insert a tab character

Hitting control-j (LF for you old timers) at the end of the line will
automatically insert a return and indent the next line. Very handy.

YOu can select a region and type m-x indent-region, to indent a
region, easier to remember than the key stroke.

Forrest
 

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

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,217
Latest member
topweb3twitterchannels

Latest Threads

Top