Sublime Forum

[SOLVED] tab_size is 2 but gets set to 4 for some Ruby files

#1

Hello, everyone!

In my Preferences.sublime-settings, I have

"tab_size": 2, "translate_tabs_to_spaces": true,

For a few Ruby files, though (“a few” being two that I’ve found so far, in a sizable Rails project), tab_size gets set to 4:

>>> view.settings().get("tab_size") 4L

I hadn’t seen this issue before 2.0, but one of the files has been created since then, and the other is a file in which I probably wouldn’t have noticed the issue unless I were looking for it. The file that was created recently just started having this issue today; I’ve been working in it for about a week with no previous issues.

Any ideas what could be going on here?

0 Likes

#2

I assume it might be this setting

// Set to false to disable detection of tabs vs. spaces on load "detect_indentation": true,

0 Likes

#3

Ah, indeed. Thank you!

I thought I had that setting off, but I couldn’t remember what it was called.

0 Likes

#4

[quote=“alloy-d”]Ah, indeed. Thank you!

I thought I had that setting off, but I couldn’t remember what it was called.[/quote]

No problem. I don’t know why I hedged - I knew it was this setting as I changed it myself for the same reason :wink:
Andy.

0 Likes