views:

873

answers:

2

Is there any way to force Text-Mate to use a two-space tab instead of a full tab when editing HTML (Rails) documents?

+9  A: 

Yes. There's a pop-up menu near the bottom middle of the window that probably reads Tabs: 4 or something like that. Click on it and hange it to 2 and Soft Tabs.

You should have an rhtml or erb document (or whatever file type you want to change) open for editing when doing this. The changes will stick for all documents of that type.

mipadi
Awesome; thanks!
neezer
+2  A: 

On the topic of tabs, these TextMate menu commands are also helpful:

  • Text -> Convert -> Spaces to Tabs
  • Text -> Convert -> Tabs to Spaces

Tabs to Spaces is very helpful for fixing tab-related errors when working in with Haml documents.

Gabe Hollombe