Reputation: 5088
Im using Sublime Text 3 for a javascript app. When I tab, I want it converted to 4 sapces. So I have set:
"tab_size": 4,
"translate_tabs_to_spaces": true,
This works fine. But weirdly, on some files (that also have .js extension like the ones it works on), a tab still only translates to 2 spaces. How can i fix this?
Upvotes: 1
Views: 750
Reputation: 41278
In my case, I had to set "detect_indentation": false
, and then close and reopen the file. When you leave the file opened, it will "remember" the indentation even across Sublime restarts.
Upvotes: 4
Reputation: 12882
All settings in Sublime Text follow an Order of Precedence. Here's an hypothetical example for JavaScript (in ascending order):
In this case, the bold settings will override all the others. In your case, a JavaScript package might override your user preferences.
What you can do is define tab_size
in Preferences > Settings - Syntax Specific
. Make sure you're current view is a JavaScript file before opening the setting.
Upvotes: 1