From: "Henry T. So Jr." Date: 2006-05-14T22:13:04+09:00 Subject: Re: vim reindent/beautify tip On Sunday, 14 May 2006 at 09:56:27 pm +0900, cremes.devlist@mac.com wrote: > Many of you might already know this but if not here's an interesting > tip I just discovered over on vim.org/tips. > > Base assumption: you have installed the ruby-vim gem and the vim > files are in the correct places. > > If you have old ruby files that have screwed up formatting, you can > beautify them (re-indent) using vim. > > 1. Open the file. > 2. Hit control-g to discover how many lines are in the file. > 3. While still in command-mode, type that number and then type > "==" (without the quotes). It will reindent everything. > > cr A slightly easier way to do this is to type =G (capital G) when the cursor is on the top line of the file. Henry.