[ProgSoc] Indenting with vim
Peter Brownlow
roentgenation at gmail.com
Sat Nov 14 11:06:12 EST 2009
On Sat, Nov 14, 2009 at 10:32 AM, John Elliot <jj5 at jj5.net> wrote:
>
> In most sophisticated text editors I can highlight an area of text and
> press the Tab key to indent the section per the text editors tab
> settings (e.g. pad with two spaces).
>
> I'm wondering if anyone knows how to do something similar in vim? The
> best I've been able to come up with is a macro like space space down
> home, but maybe there's a better way to do what I want?
>
>
Press 'v' to enter visual mode, then 'j' to go down or 'k' to go up. This
will highlight the lines of code. Horizontal position does not matter as
long as part of a line is highlighted. Press '=' to auto-indent the
highlighted lines.
-Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://progsoc.org/pipermail/progsoc/attachments/20091114/2ed73cb2/attachment.htm
More information about the Progsoc
mailing list