how to enable soft tabs textmate2
-
29-06-2021 - |
Frage
i've seen some other answers to this but my textmate is behaving funny. i can't enable the soft tabs, which is getting annoying now that I'm working with haml. any ideas?
attached screenshot, the softtabs option is greyed out. what am I missing?
thanks, JD
Lösung
If you want Soft Tabs enabled everywhere add the following to the .tm_properties
file in your home dir. If you don't have it just create one.
If you want to enable it for a specific project only simply create a .tm_properties
file in the project dir.
softTabs = true
tabSize = 4
If you want to enable Soft Tab only for certain file types you can add a section to the file like this:
[ *.coffee ]
softTabs = true
tabSize = 2
I would recommend you to check out how these files work. Here is an example by hmans.
Also check out Textmate 2 Tips for more info.
Update
As Michael Sheets writes in his answer, it is now possible to save the change through the GUI.
Andere Tipps
As of r9290 you can now change the tab settings from the menu at the bottom of the edit window and they will be saved for the current file type and parent file type if applicable.
These are saved into Global.tmProperties
which you can read more about in the release notes for r9290
(Help → Release Notes).