Skip to content

VS Code Auto Save – Turn it ON

vs code auto save option

By default, VS Code doesn’t have the Auto Save option turned on.

However, it’s very easy to turn on Auto Save.

 

Turn ON Auto Save

Go to File -> Auto Save and select it.

That’s all! 😅


Additional Settings

If you want to have more control over Auto Save, VS Code provides additional settings.

Press down CTRL + , (comma) or go to File -> Preferences -> Settings and type in auto save.

There we have 3 noticeable options:

  1. afterDelay
  2. onFocusChange
  3. onWindowChange

Let’s go over each one and see how it works.

afterDelay – basically saves your file after a period of time.

By default is set to 1000 milliseconds which means 1 second.

onFocusChange – saves your file when the editor loses focus, like clicking away on another file.

onWindowChange– saves your file when you tab away from VS Code, like selecting another application from the background.

That’s all 🎉


Let me know what you think about this article in the comments section below.

If you find this article helpful, please share it with others and subscribe to the blog to support me, and receive a bi-monthly-ish e-mail notification on my latest articles.   
  

Comments