In situations where files don't seem to have the indentation that you would expect them to have based on your settings, the culprit is generally this setting:
// Set to false to disable detection of tabs vs. spaces on load "detect_indentation": true,
This defaults to being turned on, which makes Sublime attempt to detect the indentation of a file when you open it. The detection can cause it to assume that the file should use tabs instead of spaces (or vice versa), as well as making it think the
tab_size is not what you expect.
In your screenshot it looks like at a minimum the second is what's happening to you; the tab size looks like it's set to
2 instead of
If you watch the status line when you open a file, you can see it generating a message there like
Detect Indentation: setting indentation to 2 or something along those lines.
The specifics for how the auto-detection works can be found in the
detect_indentation.py plugin in the
Default package, but roughly speaking it determines the indentation by seeing how many lines are indented with tabs versus with spaces as well as checking for common indent sizes.
Turning the setting off and re-opening the file clears the problem in most cases. If that still doesn't solve the problem because the indent is stuck at the old level, you may need to avail yourself of the
Convert Indentation commands that you can find in the menu that opens when you click on the part of the status line that tells you how it's indenting things.