Alex Rivera | Logout

How do you default to Soft Tabs while programming in Textmate?

Asked 2009-03-26T20:21:43.503
25

My "Soft Tabs" setting in TextMate is not sticky. After I restart TextMate, I often have to set the option again for the same file. How can I make this setting the sticky default across all files?

Edit
Report

2 Answers

21

From the documentation:

4.11 Using Spaces Instead of Tabs

TextMate can use spaces instead of tab characters. This is done by clicking the “Tab Size” pop-up in the status bar and enabling Soft Tabs.

This setting will only affect the current language and all languages with a common root that do not have the option set yet. The same applies to the state of spell checking, soft wrap and the actual tab size.

When soft tabs are enabled, TextMate will for the most part act exactly as if you were using hard tabs but the document does indeed contain spaces.

Looks like Textmate sets it for the current language, but I think Textmate analyzes the files you open and adjust its settings to match the files. You can convert the tabs in your files to spaces and vice versa in the "Text" menu.

answered 2009-03-26T20:33:41.307
1
  1. Create an alias icon for TextMate on the desktop.
  2. Drag the file to be opened to the icon.
  3. The file should now be opened in TextMate.
  4. Set the soft tab with the status bar options.
  5. Close TextMate.
  6. Repeat step 2 - 5 for each file type you want the soft tab settings to be remembered.
  7. Every time you want to open a file type with TextMate drag that file to that desktop icon.
  8. Do not open more than one file type at the same time, the second file type opened will get its soft tab settings erased.

This is the only way I've been able to get a consistant behavior on the soft tabs settings.

answered 2010-09-20T07:48:28.287

Your Answer