Friday, 6 November 2015

sublime change default indentation

1. you need open you sublime first.

2. then open a js file (if you want to set indentation for js files)

3. then go to "Preferences -> Settings -> More -> Syntax Specific -> User" it will open a new file:


4. Put below code in:

  "tab_size": 4,
  "translate_tabs_to_spaces": true
} and restart your sublime (somebody said no needs to restart. but i found my sublime have to be restarted to apply the change.)

All settings:

You also can create a ".editorconfig" file under your project folder.
1. the advantage of doing this is you can upload it to github and everybody who get your project will have the same indentation settings.
2. the disadvantage of doing this is that the settings will only work when you open your whole project, which means you will not get the right indentation if you just open a single file.

No comments:

Post a comment