Re: [TxMt] “Reformat Comment” command for Ruby bundle

Daniel Harple dharple at generalconsumption.org
Tue Aug 22 19:02:41 UTC 2006


On Aug 22, 2006, at 2:35 PM, James Edward Gray II wrote:

> I like the look of this command and am for adding it.  Let me ask  
> this before I do though.  When I enter in this (comment all on one  
> long line):
>
> class Test
>   # This is a really long line designed to test the new comment  
> rewrapping script posted to the TextMate mailing list:
> end
>
> and push Control-Q, why do I get this (second line not indented):
>
> class Test
>   # This is a really long line designed to test the new comment  
> rewrapping
> # script posted to the TextMate mailing list:
> end
>
> If we can fix that, I'm sold.

Inserting as a snippet helps, but there is still something odd going  
on. After running it on this text it correctly wraps:

         # Lorem ipsum dolor sit amet, consectetur adipisicing elit,  
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut  
enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi  
ut aliquip ex ea commodo consequat. Duis aute irure dolor in  
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla  
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in  
culpa qui officia deserunt mollit anim id est laborum.

goes to ->

         # Lorem ipsum dolor sit amet, consectetur adipisicing elit,  
sed do eiusmod
         # tempor incididunt ut labore et dolore magna aliqua. Ut  
enim ad minim veniam,
         # quis nostrud exercitation ullamco laboris nisi ut aliquip  
ex ea commodo
         # consequat. Duis aute irure dolor in reprehenderit in  
voluptate velit esse
         # cillum dolore eu fugiat nulla pariatur. Excepteur sint  
occaecat cupidatat
         # non proident, sunt in culpa qui officia deserunt mollit  
anim id est laborum.

After running the command on it again it shows up as:

         # Lorem ipsum dolor sit amet, consectetur adipisicing elit,  
sed do eiusmod
                 # tempor incididunt ut labore et dolore magna  
aliqua. Ut enim ad minim veniam,
         # quis nostrud exercitation ullamco laboris nisi ut aliquip  
ex ea commodo
         # consequat. Duis aute irure dolor in reprehenderit in  
voluptate velit esse
         # cillum dolore eu fugiat nulla pariatur. Excepteur sint  
occaecat cupidatat
         # non proident, sunt in culpa qui officia deserunt mollit  
anim id est laborum.

Any idea how to fix that?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Reformat Comment.tmCommand
Type: application/octet-stream
Size: 940 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20060822/9c47d54a/attachment.tmCommand>
-------------- next part --------------

-- Daniel



More information about the textmate mailing list