<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><DIV>On Jul 7, 2006, at 4:29 AM, Andreas Wahlin wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">It would be nice to get other symbols rather than just =, I smell a good JSON cleanup :)</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I suppose you change these two lines?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">relevant_line_pattern = /^[^=]+=/</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">column_search_pattern = / *=/</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">into something .. :/</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">How'd you change hat to include at least : (semicolon) into the pattern matching?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Andreas</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On Jul 4, 2006, at 15:56 , Chris Poirier wrote:</DIV><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I've built a TM filter command that will realign assignment blocks.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">It'll run on the current selection or on a block of statements</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">touching the current line.<SPAN class="Apple-converted-space"> </SPAN>You can find it at</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://random-dreams.org/freeware/textmate/assignment-block-tidier.txt">http://random-dreams.org/freeware/textmate/assignment-block-tidier.txt</A>.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">It's been on my shortlist since then to write a version that can</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">realign entire statements, lining up commas and closing parenthesis</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">and such.<SPAN class="Apple-converted-space"> </SPAN>I'll probably get to that this month.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Regards,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space"> </SPAN>Chris.</DIV></BLOCKQUOTE></BLOCKQUOTE></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Howdy.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I made my own version of this puppy complete with support for alignment on any character</DIV><DIV>it comes built-in with support for CSS and Ruby.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>For CSS it inserts spaces before {'s and after ;'s & :'s</DIV><DIV>For ruby it inserts spaces before = == => & # only if they have space around them</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Check out the code for more details.</DIV><DIV>Everything is eithre set by looking at the scope or by checking ENV variables, so you can extend it to support whatever language you have.</DIV><DIV>I also have a command that uses this to align on whatever character you just copied.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><B>Check it out: </B></DIV><DIV><A href="http://textmate.svn.subtlegradient.com/Bundles/tAylott_subtleGradient_BETA.tmbundle/Support/bin/assignment-block-tidier.rb">http://textmate.svn.subtlegradient.com/Bundles/tAylott_subtleGradient_BETA.tmbundle/Support/bin/assignment-block-tidier.rb</A></DIV><DIV><A href="http://textmate.svn.subtlegradient.com/Bundles/tAylott_subtleGradient_BETA.tmbundle/Commands/Align%20=.tmCommand">http://textmate.svn.subtlegradient.com/Bundles/tAylott_subtleGradient_BETA.tmbundle/Commands/Align%20=.tmCommand</A></DIV><DIV><A href="http://textmate.svn.subtlegradient.com/Bundles/tAylott_subtleGradient_BETA.tmbundle/Commands/Align%20paste.tmCommand">http://textmate.svn.subtlegradient.com/Bundles/tAylott_subtleGradient_BETA.tmbundle/Commands/Align%20paste.tmCommand</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV style=""><FONT class="Apple-style-span" size="4"><SPAN class="Apple-style-span" style="font-size: 14px;"><SPAN class="Apple-style-span" style="font-size: 14px; "><SPAN class="Apple-style-span" style="font-size: 14px; ">thomas Aylott—</SPAN></SPAN></SPAN></FONT><B style="font-weight: bold; "><SPAN class="Apple-style-span" style="font-weight: bold; "><SPAN class="Apple-style-span" style="font-weight: bold; ">subtleGradient</SPAN></SPAN></B></DIV></SPAN><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>