muirbot
muirbot

Reputation: 2081

Can textmate arrange my code into readable columns?

I like to indent repetitive lines of code so they are easy to look at and see small differences. As an example, this is hard to read:

address = "1800 Washington St."
name = "George McGoo"
user_type = "admin"

but this is easy to read:

address   = "1800 Washington St."  
name      = "George McGoo"  
user_type = "admin"

Is there a way to do this in Textmate without wearing out my space bar?

EDIT: Thanks to Meryn for the Align Assignment solution. I was hoping for something more general-purpose that I could use to align text like this css:

#anim_customer_panel_shadow           { left: 341px; top: 389px; }
#anim_customer_panel_3                { left: 394px; top: 260px; }
#anim_customer_panel_highlight_3      { left: 391px; top: 266px; }
#anim_customer_panel_3_text_highlight { left: 451px; top: 272px; }

Upvotes: 0

Views: 160

Answers (1)

Myrne Stol
Myrne Stol

Reputation: 11448

The command you're looking for is "align assignments".

Get to it by opening the bundle item selector with ⌃ ⌘ T, then search. Or use ⌥ ⌘ ] directly.

Upvotes: 2

Related Questions