I have browsed the web 3 times over but still no solution.
I have a simple js file, and I want my tabs to be 4 spaces instead of 2.
I changed the preferences set
Click On the indentation information on the status bar, that's where it says either Tab Size: num
or Spaces: num
, and a context menu will be displayed.
Assuming the starting position of a file using indentation with spaces and a width of 2, follow the following procedure to convert to indentation with spaces and a width of 4.
Convert from spaces to tabs, change the width, and then convert back to spaces, like this:
Indent Using Spaces
Convert Indentation to Tabs
Tab Width: 4
Indent Using Spaces
Convert Indentation to Spaces
If indenting with spaces with a width of 4 is what you want to use by default in all your files, then set these settings in your user preferences and bear in mind that they can be overridden by your project settings and syntax specific settings:
// 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,