0

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; }
muirbot
  • 2,061
  • 1
  • 20
  • 29

1 Answers1

2

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.

Myrne Stol
  • 11,222
  • 4
  • 40
  • 48
  • This is great, but I am looking for something more general (see edit). – muirbot May 02 '13 at 23:26
  • I don't think Textmate can do that. You may be able to hack the Ruby code for the alignment command. It seems doable, although I'm helpless when it comes to regexes. :) – Myrne Stol May 02 '13 at 23:40
  • This is at least what I was looking for, if not the OP. – beroe Feb 22 '19 at 07:20