vi and code beautify

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: der.hans
日付:  
題目: 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...