When I save file, why Visual Studio Code does format my file?

Viewed 4270

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.

4 Answers

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!

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

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.

Related