Re: Vim question
On Sat, Oct 22, 2005 at 08:11:18PM -0500, Eric P wrote:
> Paolo Pantaleo wrote:
> > I just started learning python (i think it is great). Now i have the
> > following problem:
> > How can i comment 10 lines of code in a shot? That is, how can i add a
> > # at the begenning of a range of lines?
> >
> > just to be more clear, i want to rasform
> >
> > a=['a','b','c']
> > for i in a:
> > do_something(i)
> > print i
> >
> > to
> >
> > #a=['a','b','c']
> > #for i in a:
> > # do_something(i)
> > # print i
> >
> > Thnx
> > PAolo
> > --
> >
You can simply place your cursor on the first line you want to comment
out, then :
:.,.+4s/^/#/
This will comment then 4 lines from the line your cursor is on.
--
work hard, die young
Thias
Reply to: