3

My problem is not present while editing a file, like here: Spaces to tabs in Visual Studio Code

VSC converts all tabs to spaces when I save the file. How could I stop that stupid behavior?

This are my actual user settings:

{
    "editor.insertSpaces": false,
    "editor.detectIndentation": false
}

Further informations:

 "editor.formatOnSave": false
John Lewin
  • 6,050
  • 4
  • 22
  • 20
Schlagges
  • 61
  • 1
  • 6
  • 1
    Do you have extensions installed / what file type does this happen with? Are those all your settings, or do you also have `editor.formatOnSave` enabled for instance? – Gama11 Feb 13 '17 at 14:53
  • That's the hint! Thank you. I'll update my Question – Schlagges Feb 14 '17 at 13:41

2 Answers2

3

Wish I understood more about what's happening here, but in my case, what finally worked (for now) was unchecking "Editor: Insert Spaces" in my user prefs. Without this, disabling Save on Format didn't seem to help. ¯\_(ツ)_/¯

screenshot of the "Editor: Insert Spaces" setting, unchecked

Navelgazer
  • 185
  • 1
  • 8
2

I had an extension which overrides the default behaviour:

https://marketplace.visualstudio.com/items?itemName=lonefy.vscode-JS-CSS-HTML-formatter

Schlagges
  • 61
  • 1
  • 6