Search code examples
cssmacosformatvisual-studio-codeautoformat

How do I disable all auto-formatting in vscode in OSX?


I've been trying to disable auto-formatting on save for vs code and have had no luck. I have just started using it and use no extensions.

I've tried adding the setting:

"editor.formatOnSave": false

To no avail.

It continues to take my perfectly formatted css and strip all the whitespace and stick it on one line.

Any suggestions would be appreciated. I just want it to save the file as I have written it.


Solution

  • This sounds like your css is being minified when you save the file. As a formatter would not place all the css on one line.

    Are you using a build process? eg: gulp, grunt, sass, less, etc..