Search code examples
visual-studio-codeautoformatting

How do I turn off text formatting on save in visual studio code?


I don't know why my code is auto formatted on save and for some reason changing the layout. I figured out this was due to auto format on save. How do I turn this off in Visual Studio Code?


Solution

  • For Windows

    Here are the some basics steps to be followed to turn off auto complete.

    1. Press Ctrl + Shift + P to open Command Palette. Then screen like below image appears.

      enter image description here

    2. Type Save without formatting and click the matching option available. It either commands on click or redirects you to next interface.

    If it works on click then it's fine and if you are redirected to next screen just uncheck auto format option under onsave. For me it worked on cick to the shown command.

    For Linux & Mac

    CMD + K and then S