You don't say which editor, but you can use:
ggVG=
from within vim (in command mode) to reindent a block of code.
-- Thomas Adam
--
"One of us is a cigar stand, and one of us is a lovely blue incandescent
guillotine" -- Stephen Malkmus, "Type Slowly" from "Brighten The Corners"
> On Sat, May 21, 2005 at 07:15:15AM +0900, Graham Foster wrote:
> > I'd like to be able to reformat a block of Ruby within my editor.
One
>
> You don't say which editor, but you can use:
>
> ggVG=
>
> from within vim (in command mode) to reindent a block of code.
I'm a Windows man.. and I don't use VIM. Its PSPAD (http://www.pspad.
com) and like many other editors it has a shell to OS and capture
Stdout facility. (I was interested in how to do this reformatting
generically. It looks like there is a Prettyprint module within Ruby
1.8 (its not mentioned in Pickaxe v1), but I don't understand how it
works.
Graham
It doesn't pretty print Ruby code. It pretty prints data. It's
something of #inspect on steroids.
-austin
--
Austin Ziegler * halos...@gmail.com
* Alternate: aus...@halostatue.ca