Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Nov 2000 14:30:37 -0600
From:      Dennis Moore <archon@forbidden.dough.net>
To:        freebsd-questions@FreeBSD.ORG
Cc:        8773836928@skytel.com
Subject:   Re: vi question
Message-ID:  <20001101143037.A91858@forbidden.dough.net>
In-Reply-To: <200011014727.589586540@skytel.com>; from 8773836928@skytel.com on Wed, Nov 01, 2000 at 01:47:27PM -0600
References:  <200011014727.589586540@skytel.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 01, 2000 at 01:47:27PM -0600, 8773836928@skytel.com wrote:
> Hello,
> 
> I have been editing some 
> Perl scripts in vi recently,
> and I find it very annoying
> that Perl cannot comment
> blocks of code, only lines.
> 

=comment

for my $code (@lines) {
	if (!want($run)) {
		use POD;
	}
}

=cut

> I have been reading the docs in vi, but I can't quite figure out how to
> do a substitute command that will, say, prepend a # to the next n lines,
> and later remove the # ( well, the second one I could always use :s and
> replace the first # with nothing for the next n lines. But the first one
> is still a mystery to me ).
> Any insight would be greatly appreciated.

in vim, highlight the section of lines in visual mode (v) and use:
:s/^/#/

> 
> Thanks!
> 
> P.S. Please cc: me, as I am not subscribed to the list with this account.
> Thanks again.

-- 
<BLINK> ;for (74,1970500640,1634627444,1751478816,1348825708,543711587,
1801810465){for($x=1<<1^1;$x>=1>>1;$x--) {$q=hex ff,$r=oct($x=~s,\d,$&*
10,e,$x),$x/=1/.1,$q<<=$r,$s.=chr (($_&$q)>>$r),$t++}}while($= ||= !$|)
{$o=$o?$?:$/;$|=1;print $o?$s:$"x$t if$;;print"\b"x$t;sleep 1} </BLINK>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001101143037.A91858>