Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

default indentation in sublimetext

I use Sublime Text and want JavaScript files to use three spaces for indentaiton.

I set this in Packages/User/Preferences.sublime-settings:

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

but it has no affect and I need to manually change it for each new file.

like image 603
Yaron Naveh Avatar asked Feb 20 '23 09:02

Yaron Naveh


1 Answers

When you have a JavaScript file open do the following:

Per-syntax Settings

Settings may be specified on a per-syntax basis. You can edit the settings for the current syntax using the Preferences/Settings - More/Syntax Specific - User menu.

This will allow you to set custom preferences for the current syntax. More info on indentation here: http://www.sublimetext.com/docs/2/indentation.html

like image 96
Valjas Avatar answered Feb 28 '23 01:02

Valjas