Visual selection is you're friend here..
I have learnt about it only in the past year and it's realy great...
1. stand on the beginning of the block you want to ident.
2. go to esc mode 
3. press v letting you visually select.
4. either click downwards towards the end of the block or if it's
between two empty lines you can shift - ] to jump to the end of the
block.
5. Once you have the block selected shift > or shift < as mentioned by shlomi. 

This method was shown to me by  kfir which laughed his ass off when he
saw me do a %s/^/\t/ on a selection till then..
Lior.


On Wed,  5 Jan 2005 14:59:05 +0200, Herouth Maoz <[EMAIL PROTECTED]> wrote:
> Quoting Erez Doron <[EMAIL PROTECTED]>:
> 
> > hi
> >
> >
> > the only way i'm fimiliar of indenting in vim is when i t indents line
> > by line when i type it.
> > i'm looking for a way to select a block in a c file and indent it all at
> > once
> >
> > anyone ?
> 
> If you just mean indenting it one position to the right, you should mark it
> (with the mouse) then hit ">". If you want to indent one position to the left,
> use "<".
> 
> If you wish it to perform a full pretty-printing, that is, to indent each line
> in the block as it should be indented - if there are loops in the block indent
> them more etc. - then use "=" instead.
> 
> Herouth
> 
> =================================================================
> To unsubscribe, send mail to [EMAIL PROTECTED] with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail [EMAIL PROTECTED]
> 
> 


-- 
Peace Love and Penguins -
Lior Kesos

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to