8

Good Day!

Help me, please.

This is My code. When I click CTRL+S, or click "Save All", or "Save", My Visual Studio Code format my all documents like ALT+SHIFT+F... But, I didnt click this fuction. And my CSS, or HTML code after Click button "Save". How can you see, my big code Looks terrible. How to remove this function?

Thank you in advance.

sepp2k
  • 363,768
  • 54
  • 674
  • 675
Asterix
  • 91
  • 1
  • 4

4 Answers4

13

I had this same issue and that problem is caused by the extension "JS-CSS-HTML Formatter".I uninstalled it and then it works! Hope it helps someone!

Ramya S
  • 2,954
  • 5
  • 14
  • 24
4

Go to setting (Ctrl + ,) and change editor.formatOnSave from true to false: "editor.formatOnSave": false,

autosvet
  • 869
  • 1
  • 9
  • 17
  • 2
    I had/have "false". And I even reinstalled the program, all the same situation. Maybe, do you have another advice? – Asterix Jul 02 '17 at 18:25
2

just make sure you disable/untick/make it false*(however your setting appears)* in FormatOnSave both in the user and workspace in VS CODE SETTINGS

1

I just enter image description herehad this issue as well and had to go to the tab >>> Code/Preferences/Settings/ In the search bar type in Formatting. Then look for what is being formatted on save. Mine was the "HTML > Format: Enable" I unchecked it and it fixed my problem. I know this is an old issue but I hope this answer helps others now in 2019.

Curtis M
  • 905
  • 1
  • 8
  • 14