Sublime Forum

Global settings sometimes not applied

#1

Hi

I have defined “tab_size”: 4 in my User File Settings.
When I create a new file, it always sets Tab Size to 4,
but sometimes when I open existing files it sets TabSize to 2.
when i then change it to 4 Spaces the tabview gets ajusted, but it the view is still with 2 Spaces.
like :
…class Foo {
…function bar() {
…}
…}

instead of
…class Foo {
…function bar() {
…}
…}

Can I somehow set that on fileopen it should set Tabsize to width 4,
and when it has to change it, that it f.e. replaces 2spaces with 4spaces?

Right now thats what i’m doing.

Any ideas how to solve this problems are really welcome.

Thx

0 Likes

#2

It sounds like you want to turn off indentation detection: sublimetext.com/docs/2/indentation.html

0 Likes

#3

Cool thx, not sure if it fixed it, since it happens not all the time, but that was exactly what i was looking for

0 Likes

#4

In terms of your second question (replacing 2-space indents with 4-space indents) the only way I’ve found that works is to set indentation to 2 spaces, convert indentation to tabs, set indentation to four-space tabs, and then convert back to spaces.

0 Likes