Date: Wed, 1 Nov 2000 21:21:19 +0100 From: Manuel Enrique Garcia Cuesta <megarcia@intercom.es> To: 8773836928@skytel.com Cc: freebsd-questions@FreeBSD.ORG Subject: Re: vi question Message-ID: <20001101212119.C748@ilex.kicelo.org> In-Reply-To: <200011014727.589586540@skytel.com> References: <200011014727.589586540@skytel.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi. === 8773836928@skytel.com escribía (Wed, Nov 01, 2000 at 01:47:27PM -0600): > 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. > > 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 ). > Move the cursor to the first line of the block, then type :.,+5s/^/#/ and you have commented out the current line and the five next. Something in that line to remove the #s. > Any insight would be greatly appreciated. > > Thanks! HTH Manuel Garcia P.S.: Please please please make your lines shorter, like 72 or so. 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?20001101212119.C748>