vi and code beautify

Page principale
Attachements:
Message en tant que courrier électronique
+ (text/plain)
Supprimer ce message
Répondre à ce message
Auteur: der.hans
Date:  
Sujet: vi and code beautify
moin, moin,

do any of the vi clones have a way to re-indent code?

I know emacs has something, but have only used it once or twice.

I want to be able to automagically reindent a block.

Say I add an if statement, I want to automagically be able to toss
everything that it now surrounds in one more tab.

e.g.:

if ( $fred ) {
&do_the_fred;
}

becomes:

if ( $fred ) {
    &do_the_fred;
}


This hopefully works for multiple languages. I'll worry about particulars
such as brace placement after I have something already working :).

ciao,

der.hans
--
# http://home.pages.de/~lufthans/ http://www.DevelopOnline.com/
# We now return you to your regularly scheduled paranoia...