[TxMt] Command to align comments

Michael Tyson michael at tyson.id.au
Fri Mar 27 01:52:05 UTC 2009


Hi folks,

In case anyone else is interested, I've just put together a command  
that aligns comments in a block - a trivially modified version of  
Chris Poirer's 'align assignments' script.

It fixes this:

imagecopy($image, $frame,
           ($x=max($width-$this->topRightCap[kCapWidth], $this- 
 >topLeftCap[kCapWidth])), // Destination x
           0,  // Destination y
           $x,  // Source x
           0,  // Source y
           min($this->topRightCap[kCapWidth], $width-$this- 
 >topLeftCap[kCapWidth]),  // Source width
           $this->topRightCap[kCapHeight]); // Source height

Ctrl-Option-Command-/, then:

imagecopy($image, $frame,
           ($x=max($width-$this->topRightCap[kCapWidth], $this- 
 >topLeftCap[kCapWidth])), // Destination x
            
0 
,                                                                            // Destination 
  y
            
$ 
x 
,                                                                           // Source 
  x
            
0 
,                                                                            // Source 
  y
           min($this->topRightCap[kCapWidth], $width-$this- 
 >topLeftCap[kCapWidth]),      // Source width
           $this- 
 > 
topRightCap 
[kCapHeight]);                                              // Source  
height

More info & download at http://michael.tyson.id.au/2009/03/27/align-comments-in-textmate/

Cheers,

Michael

-- 
Michael Tyson | michael.tyson.id.au

m: (+61) 0407 754 124
e: michael at tyson.id.au
aim: mikerusselltyson
twitter: MichaelTyson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20090327/0019dba9/attachment.html>


More information about the textmate mailing list