Indenting lines 400..457 help
Ned Harvey
rahvee at yaahhoo.com
Wed Apr 10 18:50:13 EDT 2002
Damn, you guys are great!
"Geoff Gerrietts" <geoff at gerrietts.net> wrote in message
news:mailman.1018473981.17738.python-list at python.org...
> Quoting Ned Harvey (rahvee at yaahhoo.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.
>
> In vim, the easiest way is to hit V, scroll down a few lines, then hit
> the > key to shift everything right one indent level. If the indent
> level is too large, :set shiftwidth=4. I also recommend :set
> tabstop=8, :set softtabstop=4, :set expandtab.
>
> In oldschool vi, try:
> :400
> 57>>
>
> Another common trick I use is:
>
> :400,457s/^/ /
>
> Best of luck,
> --G.
>
> --
> Geoff Gerrietts "Overspecialize and you breed in weakness.
> <geoff at gerrietts net> It's slow death." -- Maj. Motoko Kusanagi
> http://www.gerrietts.net (Ghost in the Shell)
>
>
More information about the Python-list
mailing list