Sublime Forum

Why there is a tab size detection if I am able to set tab_size to 4?

#1

Why there is a tab size detection if I am able to set tab_size to 4?

Basically, this tab thing on Sublime Text is very confusing. I ran into this problem: #1459 Wrong tab size detection.

The settings detect_indentation uses a confusing name. When I read it, it says the Sublime Text will to stop running its tab_detection_size algorithm. I want force 4 spaces indentation size, not stop detecting about whether the indentation should be by tabs or spaces on the file.

    // Set to false to disable detection of tabs vs. spaces on load
    "detect_indentation": true,

Is there a setting to for my indention detection to be 4 spaces?
Looks like there is and it is this bellow. Then should be a problem on the Syntax Specific settings I am using. It could be overriding this settings to 2 spaces:

    // The number of spaces a tab is considered equal to
    "tab_size": 2,
`` 


___

I found this on the doc: http://www.sublimetext.com/docs/2/indentation.html
[quote]
Indentation Detection

When a file is loaded, its contents are examined, and the tab_size and translate_tabs_to_spaces settings are set for that file. The status area will report when this happens. While this generally works well, you may want to disable it. You can do that with the detect_indentation setting.
[/quote]

So, there is not way to disable only the indentation detection without disabling the `tab_versus_spaces` detection?

Related threads:

1. [#1784](https://forum.sublimetext.com/t/better-detection-of-indentation-setting/1784) Better detection of indentation setting
1. [#3617](https://forum.sublimetext.com/t/javascript-indentation-doesnt-respect-my-settings/3617)JavaScript Indentation doesn’t respect my settings?
1. [#12477](https://forum.sublimetext.com/t/indenting-twice-the-size/12477) Indenting twice the size
1. [#23585](https://forum.sublimetext.com/t/indenting-and-tabs/23585) Indenting and tabs
1. [#14524](https://forum.sublimetext.com/t/detect-indentation-setting-being-overwritten-by-a-file/14524) Detect Indentation Setting Being Overwritten By A File
0 Likes