Home Download Buy Blog Forum Support

Global settings sometimes not applied

Global settings sometimes not applied

Postby nessa on Mon Nov 21, 2011 10:20 am

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
nessa
 
Posts: 5
Joined: Thu Oct 27, 2011 6:59 am

Re: Global settings sometimes not applied

Postby jps on Mon Nov 21, 2011 11:22 am

It sounds like you want to turn off indentation detection: http://www.sublimetext.com/docs/2/indentation.html
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Global settings sometimes not applied

Postby nessa on Mon Nov 21, 2011 11:54 am

Cool thx, not sure if it fixed it, since it happens not all the time, but that was exactly what i was looking for
nessa
 
Posts: 5
Joined: Thu Oct 27, 2011 6:59 am

Re: Global settings sometimes not applied

Postby adzenith on Mon Nov 21, 2011 5:09 pm

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.
adzenith
 
Posts: 1215
Joined: Mon Oct 19, 2009 9:12 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], nonolly and 11 guests