How to force Sublime Text 2 to use a tab of 3 spaces in PHP files?

In some of my PHP files, Sublime shows vertical lines (stop tabs?) Divided by 2 characters, and other files by default have these vertical lines at a distance of 3 characters (my preferred tab length).

Vertical lines can be seen below (these lines are divided into 3 characters):

[Note, I cannot post a screenshot because I do not have enough points!]

My custom settings file is as follows:

{
    "draw_white_space": "none",
    "ignored_packages":
    [
        "Vintage"
    ],
    "tab_size": 3,
    "translate_tabs_to_spaces": true,
    "detect_indentation": false,
    "smart_indent": false,
    "use_tab_stops": false,
    "trim_trailing_white_space_on_save": true,
    "fallback_encoding": "UTF-8",
    "rulers": [80, 120]
}

I tried different permutations detect_indentation, smart_indent and use_tab_stops, i.e. completely omitting true / false, etc. It didn’t matter.

, : a) PHP, , 2 , 3 . b) .

Sublime Text 2 , ?

.

+5
2

PHP, "". Packages/User/PHP.sublime-settings :

{
    "tab_size": 3,
    "translate_tabs_to_spaces": true,
    "detect_indentation": false
}

, (.. PHP), Packages/User/Preferences.sublime-settings.

+9

- valids, , Preferences.sublime-settings, .

Preferences.sublime-settings :

Prefenrences > Setting - Default

. :

/home/<user_name>/.config/sublime-text-3/Packages/Default/Preferences.sublime-settings

Linux, , . Windowns C:\\Programs Files\Sublime Text 3\[...]

Preferences.sublime , , . - true, false numeric.

"tab_size", 4 - Python), .

// Set to true to turn spell checking on by default
"spell_check": false,

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

// Set to true to insert spaces when tab is pressed
"translate_tabs_to_spaces": true,

// If translate_tabs_to_spaces is true, use_tab_stops will make tab and
// backspace insert/delete up to the next tabstop
"use_tab_stops": true,

, , :

"translate_tabs_to_spaces": true, //prevents that to switch from editor the indentation be changed.

"highlight_line": true, //highlights the line where the course is.

"auto_complete_commit_on_tab": true, //allows complement of code structure with tab key.
+1

All Articles