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

Matt Musgrove MMusgrove at efji.com
Thu Feb 21 10:37:06 PST 2013


I typically use TODO and BUG (something I added to my vim installation). You can add it to yours easily enough. Edit ~/.vim/syntax/perl.vim and add the following lines in the appropriate sections:
syn match perlBug                       "\<\(BUG\)\:\?\>" contained
syn match  perlComment              "#.*" contains=perlTodo,perlBug
  HiLink perlBug            ErrorMsg

[cid:image001.png at 01CE102E.C244EC80]

Newer versions of vim-perl also support NOTE.

From: Dfw-pm [mailto:dfw-pm-bounces+mmusgrove=efji.com at pm.org] On Behalf Of Tommy Butler
Sent: Thursday, February 21, 2013 12:04 PM
To: dfw-pm at pm.org
Subject: [DFW.pm] Not only was Patrick right, but Vim backs him up...

In our last meeting Patrick M mentioned that it was a Perlesque thing to do to place a "#XXX" designator comment wherever there was code that needed to be revisited.  He went on to say that in the collaborative development on Perl 5, the maintainers use that "flag" to signal that something needs to be looked over again.

I thought to myself that I'd adopt the convention and try it out.  Well for anyone who knows me, I'm a hardcover Vim'mer, and my .vimrc file is customized for Perl development.  All Perl syntax highlighting and context-based auto-folding is enabled, plugins installed, ad nauseum.

Today when I typed in the old "#XXX" comment into vim, the Perl syntax highlighting engine lit it up in bright color.  I've attached a screenshot inline for anyone who might find it even as partially amusing as myself.  Even with the :setnohls flag enabled for vim, the Perl syntax highlighter *still* highlights the "#XXX" so that it is very easy to see when speedily combing through a file.

AWESOME!  As a demonstration, I typed it in several times for maximum shock value---

[cid:image002.png at 01CE102E.C244EC80]

What can I say?  These little things amuse me.  Now please try your hardest to refrain from telling me how lame I am for not knowing this already.  If you can't resist, it's OK, I guess I can take it.

--Tommy Butler
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/dfw-pm/attachments/20130221/0c09e929/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 2430 bytes
Desc: image001.png
URL: <http://mail.pm.org/pipermail/dfw-pm/attachments/20130221/0c09e929/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 574890 bytes
Desc: image002.png
URL: <http://mail.pm.org/pipermail/dfw-pm/attachments/20130221/0c09e929/attachment-0003.png>


More information about the Dfw-pm mailing list