Home Download Buy Blog Forum Support

Howto -- configuring indentation using spaces?

Howto -- configuring indentation using spaces?

Postby harald on Wed Apr 25, 2012 6:47 pm

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
}
harald
 
Posts: 4
Joined: Sat Feb 05, 2011 3:13 pm

Re: Howto -- configuring indentation using spaces?

Postby bizoo on Wed Apr 25, 2012 7:33 pm

Maybe you have a syntax specific sublime-settings file like this one:
Code: Select all
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
bizoo
 
Posts: 883
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Howto -- configuring indentation using spaces?

Postby harald on Thu Apr 26, 2012 5:53 pm

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!
harald
 
Posts: 4
Joined: Sat Feb 05, 2011 3:13 pm

Re: Howto -- configuring indentation using spaces?

Postby jps on Fri Apr 27, 2012 7:58 am

Take a look at the Troubleshooting section of http://www.sublimetext.com/docs/2/settings.html to see the currently applied value of a setting
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm


Return to Technical Support

Who is online

Users browsing this forum: copaesthetic and 28 guests