1

I'm trying to make some statements visually line-up on the equal signs (per company style), which requires me putting extra spaces inside the line.

However, when I press save, VS Code deletes the spaces: even though I have all extensions off, and have it set to show all whitespace.

clip of problem, jump is on save

Any clue what might be causing this? I've tried restarting, toggling all the whitespace settings, disabling all extensions; no luck.

1 Answer 1

3
  • ctrl+comma

  • add line:

"editor.formatOnSave": false 

You can also exclude some file types from format on save if you don't want to turn format on save off:

"editor.formatOnSave": true, "[javascript]": { "editor.formatOnSave": false } 
Sign up to request clarification or add additional context in comments.

2 Comments

I still think it's valuable to have format on save in my workspace, though. Is there a way to change how it formats?
@soph_iest I don't think so, but you can exclude some file types. Updated the answer.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.