Sublime Forum

How to change tab_size? Yes, that simple

#1

Relatively new Sublime user has question…
I’m working on an iMac using Monterey OS and Sublime Text build 4143. I am trying to change default tab_size from 4 down to 2. I’ve searched the Forum and found a couple of similar queries. But, I’m sad to admit, I couldn’t implement any changes. For example, where is /Packages/User located?
Pretend I’m a fairly bright 12-year-old (not true) who understands basic English but is new to the Sublime file and documentation jungle.
Thanks.

0 Likes

#2

Open setting (Preferences > Settings) and paste "tab_size": 2, into the right column between the {}. See http://www.sublimetext.com/docs/settings.html

0 Likes

#3

Thanks for your response!
Prior to my posting I did exactly the editing of Preferences/Settings you suggest. It doesn’t work when editing files created prior to the change of tab_size in Settings. Some of those files might have been originated much earlier when I was using a different editor.
In any case, the change does apply as intended to newly-created files – an experiment I hadn’t tried before your contribution. Hmmm. Perhaps more experiments will show why.
Thanks, again.

0 Likes

#4

When opening a file ST detects the indentation used in said file. You can turn off this feature using the "detect_indentation" setting.

0 Likes

#5

Aha! I’m sure your suggestion will fix the tab problem when migrating old projects into ST.
Thanks again.

0 Likes