Sublime Forum

Howto -- configuring indentation using spaces?

#1

Hi,

i am using Sublime Text Build 2181 on Mac OSX and i seem to be unable to figure out how to configure sublime to always use spaces for indenting. I’ve not modified “Settings - Default”, but “Settings - User”. But i have still to always switch to use “spaces” instead of “tabs” in the status-line of the editor, manually, no matter if i start editing a new file or if i edit a file, that was already saved with “spaces” for indentation, only. below, my settings – am i missing something? I am pretty sure, that sublime loads the settings file, because the other settings work – like the color-scheme, the rulers, “draw_white_space” settings, etc. thanx very much in advance!

file: “Settings - User”

{
// Sets the colors used within the text area
“color_scheme”: “Packages/Color Scheme - Default/Solarized (Light).tmTheme”,

// Set to true to turn on the indentation guides.
"draw_indent_guides": true,

// Set to  "all" to draw all white space
"draw_white_space": "all",

// Columns in which to display vertical rulers
"rulers": [80, 160],

// 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_space": 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,

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

// Set to true to removing trailing white space on save
"trim_trailing_white_space_on_save": false,

// When enabled, pressing tab will insert the best matching completion.
"tab_completion": false,

// Enable auto complete to be triggered automatically when typing.
"auto_complete": true

}

0 Likes

#2

Maybe you have a syntax specific sublime-settings file like this one:

Sublime Text 2\Packages\Makefile\Makefile.sublime-settings: { "translate_tabs_to_spaces": false, "detect_indentation": false }
Look at http://docs.sublimetext.info/en/latest/customization/settings.html#order-of-precedence-of-sublime-settings-files

0 Likes

#3

thanks for your answer. the “order of precedence” was very insightful, however it seems, that i have no language specific settings (for PHP and javascript), which might overwrite my user-settings. is there anything else, that could cause the problem for me? is there any possibility in sublime to actually display the values of the active properties?

thanks!

0 Likes

#4

Take a look at the Troubleshooting section of sublimetext.com/docs/2/settings.html to see the currently applied value of a setting

0 Likes