Am 14. Oct, 2003 schw=E4tzte Kevin Buettner so:
> Use the '>' operator for this. E.g. >> will right-shift one line by
> the shiftwidth amount (which may be different than the tabstop
> amount). >L will shift all the lines to the bottom of the screen, >'h
> will shift all lines from the current position to the mark named "h",
> etc.
Cool, '<' goes the other way and '.' works for both.
Is there a way to select a section of code? That's the part that's missing.
if ( $fred ) {
=09# Stoff
=09if ( $anke ) {
=09=09# Other Stoff
=09}
}
It'd be nice to choose the 'matching' brace and then operate on those lines=
=2E
I do the indents via search and replace.
:.,5s/^/\t/g
That says to select the next five lines starting at the current line, searc=
h
for the start of the line and replace it with a tab. ( Kevin, that's for th=
e
home audience as I'm sure you understand it :)
Don't forget that the execution line ( ':' ) has a history buffer, so start
a new execution line, then hit the up arrow :). ^P works too. That just
seems wrong, emacs-style command line editing within vi...
ciao,
der.hans
--=20
# https://www.LuftHans.com/ http://www.AZOTO.org/
# HERE LIES LESTER MOORE
# SHOT 4 TIMES WITH A .44
# NO LES
# NO MOORE
# -- tombstone, in Tombstone, AZ