Sometimes you might want to set the tab width to one space in textmate. For example, perhaps you’re working on the XML files that power the PHP manual (don’t complain, it’s been in the coding standard since the 90’s for well over six thousand files). Because the minimum tab width offered by the textmate GUI is 2 spaces, you may use the command-line like so:
defaults write com.macromates.textmate OakTextViewScopedTabSize -dict-add 'text.xml' '{ tabSize = 1; }'
There, tab size now defaults to one space for XML files.