From owner-freebsd-questions Wed Nov 1 12:30:40 2000 Delivered-To: freebsd-questions@freebsd.org Received: from forbidden.dough.net (forbidden.dough.net [24.219.84.249]) by hub.freebsd.org (Postfix) with ESMTP id 68A2137B4C5 for ; Wed, 1 Nov 2000 12:30:38 -0800 (PST) Received: (from archon@localhost) by forbidden.dough.net (8.9.3/8.9.3) id OAA91898; Wed, 1 Nov 2000 14:30:37 -0600 (CST) (envelope-from archon) Date: Wed, 1 Nov 2000 14:30:37 -0600 From: Dennis Moore To: freebsd-questions@FreeBSD.ORG Cc: 8773836928@skytel.com Subject: Re: vi question Message-ID: <20001101143037.A91858@forbidden.dough.net> Mail-Followup-To: freebsd-questions@FreeBSD.ORG, 8773836928@skytel.com References: <200011014727.589586540@skytel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200011014727.589586540@skytel.com>; from 8773836928@skytel.com on Wed, Nov 01, 2000 at 01:47:27PM -0600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. -- ;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} To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message