[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: indent for Ruby, to reformat it

Forrest Chang

12/7/2005 8:45:00 PM

"Phlip" <phlipcpp@yahoo.com> writes:

> 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