[TxMt] Reformat Comment command

Daniel Grady d.c.grady at gmail.com
Mon Aug 2 23:28:14 UTC 2010


Hi, I made two small changes related to the Reformat Comment command in the Source bundle. The first is to have the command respect the wrap column set in TextMate's interface. The second is a fix to the rubywrap.rb script; it previously did not handle empty comment lines correctly. For example, if you were to run

// lorem ...
// 
// lorem ...

through rubywrap, it will add an extra space at the end of the empty line in the middle. Within the script a regular expression is used to identify comment lines, and this regexp would incorrectly match the newline at the end of the empty line; I changed it so that it only matches trailing spaces. A diff of the changes is attached.

I haven't noticed either of these changes causing problems that didn't exist before; maybe they could be rolled in to the Source bundle?

-Daniel Grady

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Source.patch.zip
Type: application/zip
Size: 1231 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20100802/07c1388f/attachment.zip>
-------------- next part --------------





More information about the textmate mailing list