[TxMt] Re: ANN: AlignText bundle

Guoliang Cao gcao at vonage.com
Thu May 20 15:34:44 UTC 2010


Sorry the bundle is located at   http://github.com/gcao/AlignText.tmbundle

On May 20, 2010, at 10:02 AM, Guoliang Cao wrote:

> Hi,
>
> To scratch my own itch, I extended the Align Source command to take  
> a pattern from input box and align text in any way I like. For example
>
>    options["split_test"] = split_test if split_test
>    options["eligible_test_candidate"] = "true" if  
> eligible_test_candidate?
>    options["default_device"] = "true" if default_device?
>    options["refer_id"] = refer_id if refer_id
>    options["plan_package_code"] = plan_package.code if plan_package
>
> With input "\]   if", above code will be formatted to below
>
>    options["split_test"             ] = split_test        if  
> split_test
>    options["eligible_test_candidate"] = "true"            if  
> eligible_test_candidate?
>    options["default_device"         ] = "true"            if  
> default_device?
>    options["refer_id"               ] = refer_id          if refer_id
>    options["plan_package_code"      ] = plan_package.code if  
> plan_package
>
> The bundle is located at
>
> http://github.com/gcao/AlignText
>
> The shortcut for align by pattern is Command+Alt+Ctrl+]. It only  
> works for text selection.
>
> Multiple patterns are separated by three spaces. If the first  
> pattern starts with a space, it will not align by first pattern.
>
> Hope you find it useful. Feel free to clone and modify for your needs.
>
>
> Regards,
>
> Guoliang Cao
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate




More information about the textmate mailing list