[DFW.pm] Not only was Patrick right, but Vim backs him up...

Matthew Musgrove mr.muskrat at gmail.com
Fri Feb 22 20:59:25 PST 2013


Going from memory but sounds right...

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.

Matt


On Fri, Feb 22, 2013 at 10:29 PM, Tommy Butler <
masterbucket at internetalias.net> wrote:

> Yes, that is definitely handy.
>
> 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...
>
> --
> Tommy Butler
>
> kevin <kbrannen at pwhome.com> wrote:
>>
>> On 02/21/2013 05:30 PM, Tommy Butler wrote:
>>
>>>
>>> What does your .vimrc look like?  I always like to see what goodies
>>> there are to be found in the .vimrc files of fellow Perl hackers :-D
>>
>>
>> Something I've done for a long time in my .vimrc and find useful is:
>>
>> map ,c :'a,'bs/^/#/
>> map ,u :'a,'bs/^#//
>>
>> Then I can mark a range of lines with 'a and 'b, then hit ,c and the
>> range is commented out. Similarly, ,u uncomments a range of lines.
>>
>> Kevin
>> ------------------------------
>>
>> Dfw-pm mailing list
>> Dfw-pm at pm.org
>> http://mail.pm.org/mailman/listinfo/dfw-pm
>>
>>
> --
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
>
> _______________________________________________
> Dfw-pm mailing list
> Dfw-pm at pm.org
> http://mail.pm.org/mailman/listinfo/dfw-pm
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/dfw-pm/attachments/20130222/5f794b26/attachment.html>


More information about the Dfw-pm mailing list