Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

tabs

textmate

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?

like image 573
Kelvin Avatar asked Sep 11 '25 02:09

Kelvin


2 Answers

For Textmate 1

After doing some research, I found that you can set TextMate 1 to default to using Soft tabs.

In the "Shell Variables" area of the Advanced preferences pane, add a new entry with the name TM_SOFT_TABS and a value of YES.

From that point on, TextMate should default to Soft tabs, though for at least one or two languages, I had to specify the number of tabs. After I did that, it seemed to stick for everything I did.

like image 130
DarthNerdus Avatar answered Sep 13 '25 10:09

DarthNerdus


For Textmate 2

To set the options in TextMate 2 add following settings to your ~/.tm_properties file:

softWrap = true  
tabSize = 4  
softTabs = true

Check these links for more information:

FAQ: https://github.com/textmate/textmate/wiki/FAQ
Settings: http://wiki.macromates.com/Reference/Settings

like image 31
Ivan Sviatenko Avatar answered Sep 13 '25 11:09

Ivan Sviatenko