Indenting lines 400..457 help

Ned Harvey rahvee at yaahhoo.com
Wed Apr 10 18:44:35 EDT 2002


That's not bad.  Not bad at all.
Now of course, the reason I want to {in|de}dent a large section of text, is
because I'm copying a large section of python code.  So my *real* goal is to
insert (or delete) a given number of spaces at the beginning of a whole
bunch of lines, to make it match the indentation of the surrounding code.

By using the >> or << method below, vi uses the tab-characters, at least in
my account.  Is there any way you're aware of, that I can specify the
characters to use?

My vi-manual doesn't seem to say anything about it.

Thanks again.

"Brett g Porter" <BgPorter at NOartlogicSPAM.com> wrote in message
news:Fc2t8.90644$w7.7532194 at bin6.nnrp.aus1.giganews.com...
>
> "Ned Harvey" <rahvee at yaahhoo.com> wrote in message
> news:a929tk$ik2$1 at pcls4.std.com...
> > For the life of me, I can't find any easy way to indent (or unindent)
> lines
> > numbered 400..457 or whatever.  Does anyone have any good suggestions?
> >
> > I'm usually a vi user, but I'll happily learn a command of some other
> > format.  I've tried
> >     :400,457s/(.*)/   \1/g
> > and a ton of variations of the same idea, but it seems that the
> > search/replace doesn't do what I expect it to.
> >
> > Thanks for your help.
> In vi, place the cursor on the first line that you want {in|de}dented.
Then
> type the number of lines to affect and >> to indent, or << to dedent.
>
>
> --
> --
> //  Today's Oblique Strategy (© Brian Eno/Peter Schmidt):
> //  Don't be afraid of things because they're easy to do
> //
> //  Brett g Porter * BgPorter at acm.org
> //  http://mywebpages.comcast.net/bgporter/
>
>
>





More information about the Python-list mailing list