Sublime Forum

Tab indent not working

#1

Hello!

I have Sublime Text 2 Version 2.0.1, Build 2217 (atm latest) and following appears:

For random .rb file tabs will be rendered incorrectly (4 instead of 2).

Steps:

  1. Create a new .rb file, paste content from orginal to there - tabs are ok (both indenting and visually)
  2. Delete orginal file
  3. Rename new to orginal file - tabs are ok
  4. Reopen file - tabs are again incorrect (tab size 4)

Any ideas how to fix?

0 Likes

#2

To reproduce:

  1. Create a new file without saving it and have elements different with 4 tab sizes (on line one have no spaces, on line two have four spaces)
  2. Save it to .rb (tab size is not changed)

To solve:

Close and open through menu File -> Open. It seems that opening on left side browser does not fix indent.

0 Likes

#3

Perhaps you’re looking for this option?

[code] // Set to false to disable detection of tabs vs. spaces on load
“detect_indentation”: true,

[/code]
Try setting it to false?

0 Likes