<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style>
<!--
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
@font-face
        {font-family:Consolas}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New"}
span.HTMLPreformattedChar
        {font-family:Consolas}
span.EmailStyle19
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
div.WordSection1
        {}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">For how I was using it, ctrl-v was the appropriate means of selecting the first character of each line so that typing I#ESC (shift-i shift-3 ESC) would comment
 out each line. It only comments out the first line if you select all of the lines with v or shift-v.
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Matt</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif""> Dfw-pm [mailto:dfw-pm-bounces+mmusgrove=efji.com@pm.org]
<b>On Behalf Of </b>Andy Robertson<br>
<b>Sent:</b> Saturday, February 23, 2013 9:42 AM<br>
<b>To:</b> dfw-pm@pm.org<br>
<b>Subject:</b> Re: [DFW.pm] Not only was Patrick right, but Vim backs him up...</span></p>
<p class="MsoNormal"> </p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<p class="MsoNormal">I think the user is looking for shift-v.  In UNIX vim, ctrl-v is literally block mode where a rectangular select area can be selected and worked upon.  shift-v selects entire lines.  In Windows vim I type ctrl-q for block selection, instead
 of ctrl-v, but I think this is an optional mapping I had to add to the config.  I believe the user is referring to the shift-v mode to select lines.  Also, just v works as well for selecting from a point in a line to another point, regardless of square blocking
 or line blocking.<br>
<br>
During a selection, just enter : to start editing a command.  Any operations can then be performed on the selected area using replace, but the markers for the start and end of the selected area are '< and '> ,  So, search and replace like the following works
 to put a comment at the start of the line:<br>
<br>
:'<,'>s/^/# /<br>
<br>
More advance things work like '<,'>s/foo/bar/g and multiple changes can be stitched with pipes like:<br>
<br>
:'<,'>s/^/# / | '<,'>s/foo/bar/g <br>
<br>
However, if a piped regex fails to match anything, the regexes in the list after the non-matching select are not executed.<br>
<br>
Also, as far as 'two book marks', that works too, just like line numbers:<br>
<br>
:'a,'bs/^/# /<br>
<br>
Where, a user wants all lines from mark a to mark b prepended with an octothorpe and a lacuna.<br>
<br>
All these work in normal Vim.  Vim also supports variables in regexes, like perl.  But, instead of parens in order to block a save for reuse, backslashes are necessary before the open parens and the close parens.  Regular VI also normally supports the mark
 changes, eg 'a,'b, but not visual selections.<br>
<br>
Or, did I lose track, and this is a syntax discussion for Perl-vim which I've never used?<br>
<br>
      Andy<br>
<br>
--- On <b>Fri, 2/22/13, Matthew Musgrove <i><<a href="mailto:mr.muskrat@gmail.com">mr.muskrat@gmail.com</a>></i></b> wrote:</p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
From: Matthew Musgrove <<a href="mailto:mr.muskrat@gmail.com">mr.muskrat@gmail.com</a>><br>
Subject: Re: [DFW.pm] Not only was Patrick right, but Vim backs him up...<br>
To: <a href="mailto:dfw-pm@pm.org">dfw-pm@pm.org</a><br>
Date: Friday, February 22, 2013, 11:27 PM</p>
<div id="yiv1312276936">
<div>
<p class="MsoNormal">My mistake. Ctrl-v.</p>
</div>
<div>
<p class="MsoNormal"><br clear="all">
</p>
<div>
<p class="MsoNormal">Matt</p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"> </p>
<div>
<p class="MsoNormal">On Fri, Feb 22, 2013 at 10:59 PM, Matthew Musgrove <<a href="/mc/compose?to=mr.muskrat@gmail.com" target="_blank">mr.muskrat@gmail.com</a>> wrote:</p>
<div>
<div>
<p class="MsoNormal">Going from memory but sounds right...<br>
<br>
Position your cursor on the first character of the first line to comment out. Press 'v' to go into visual character mode. Position your cursor on the first character of the last line to comment out. Press 'I' to enter insert mode. Press '#' followed by 'ESC'.
 Done.</p>
</div>
</div>
<div>
<p class="MsoNormal"><br clear="all">
</p>
<div>
<p class="MsoNormal">Matt</p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"> </p>
<div>
<div>
<div>
<p class="MsoNormal">On Fri, Feb 22, 2013 at 10:29 PM, Tommy Butler <<a href="/mc/compose?to=masterbucket@internetalias.net" target="_blank">masterbucket@internetalias.net</a>> wrote:</p>
</div>
</div>
<blockquote style="border:none; border-left:solid #CCCCCC 1.0pt; padding:0in 0in 0in 6.0pt; margin-left:4.8pt; margin-right:0in">
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Yes, that is definitely handy.<br>
<br>
But is there some easier way to do block commenting that doesn't consume two bookmarks? I find myself doing it based on line numbers, but it hasn't irritated me enough to look up a better way yet...<br>
<br>
-- <br>
Tommy Butler</p>
<div>
<p class="MsoNormal">kevin <<a href="/mc/compose?to=kbrannen@pwhome.com" target="_blank">kbrannen@pwhome.com</a>> wrote:</p>
<div>
<pre style="white-space:pre-wrap; word-wrap:break-word"><span style="font-family:"Arial","sans-serif"">On 02/21/2013 05:30 PM, Tommy Butler wrote:</span></pre>
<pre><span style="font-family:"Arial","sans-serif""> </span></pre>
<pre><span style="font-family:"Arial","sans-serif""> </span></pre>
<pre><span style="font-family:"Arial","sans-serif""> </span></pre>
<pre><span style="font-family:"Arial","sans-serif"">What does your .vimrc look like?  I always like to see what goodies<br>there are to be found in the .vimrc files of fellow Perl hackers :-D</span></pre>
<pre><span style="font-family:"Arial","sans-serif""><br>Something I've done for a long time in my .vimrc and find useful is:<br><br></span></pre>
<pre><span style="font-family:"Arial","sans-serif""> </span></pre>
<pre><span style="font-family:"Arial","sans-serif""> </span></pre>
<pre><span style="font-family:"Arial","sans-serif""><br>map ,c :'a,'bs/^/#/<br>map ,u :'a,'bs/^#//<br><br>Then I can mark a range of lines with 'a and 'b, then hit ,c and the <br>range is commented out. Similarly, ,u uncomments a range of lines.<br><br></span></pre>
<pre><span style="font-family:"Arial","sans-serif""> </span></pre>
<pre><span style="font-family:"Arial","sans-serif""> </span></pre>
<pre><span style="font-family:"Arial","sans-serif""><br>Kevin</span></pre>
<pre style="text-align:center"><span style="font-family:"Arial","sans-serif""><hr size="2" width="100%" align="center"></span></pre>
<pre><span style="font-family:"Arial","sans-serif""> </span></pre>
</div>
<div>
<pre><span style="font-family:"Arial","sans-serif"">Dfw-pm mailing list<br><a href="/mc/compose?to=Dfw-pm@pm.org" target="_blank">Dfw-pm@pm.org</a><br><a href="http://mail.pm.org/mailman/listinfo/dfw-pm" target="_blank">http://mail.pm.org/mailman/listinfo/dfw-pm</a><br><br></span></pre>
<pre><span style="font-family:"Arial","sans-serif""> </span></pre>
<pre><span style="font-family:"Arial","sans-serif""> </span></pre>
</div>
</div>
<p class="MsoNormal"><span style="color:#888888"><br>
-- <br>
Sent from my Android phone with K-9 Mail. Please excuse my brevity.</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
</div>
</div>
<p class="MsoNormal">_______________________________________________</p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
Dfw-pm mailing list<br>
<a href="/mc/compose?to=Dfw-pm@pm.org" target="_blank">Dfw-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/dfw-pm" target="_blank">http://mail.pm.org/mailman/listinfo/dfw-pm</a></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"> </p>
</div>
</div>
<p class="MsoNormal"> </p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
-----Inline Attachment Follows-----</p>
<div>
<p class="MsoNormal">_______________________________________________<br>
Dfw-pm mailing list<br>
<a href="/mc/compose?to=Dfw-pm@pm.org">Dfw-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/dfw-pm" target="_blank">http://mail.pm.org/mailman/listinfo/dfw-pm</a></p>
</div>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Calibri","sans-serif""> </span></p>
</div>
This e-mail transmission, and any documents, files or previous e-mail messages attached to it, may contain confidential information. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified
 that any disclosure, distribution, review, copy or use of any of the information contained in or attached to this message is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify us by reply e-mail, and destroy the
 original transmission and its attachments without reading them or saving them to disk. Thank you.
</body>
</html>