Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I disable Visual Studio Code auto save

Some months ago I observed that angular-cli or Visual Code is saving my files after short delay. Which causes recompiling a project and refreshing a page. It is useful but frustrating a bit to wait couple of seconds every single time for refresh. Even after just opening a file. So, the solution that just hit me is very simple. Go to Preferences/Settings, in Workspace Settings put

"files.autoSave": "off"

That's it! Now your project will be compiled ONLY after you hit save.

like image 327
Paweł Stolka Avatar asked Sep 01 '18 16:09

Paweł Stolka


People also ask

How do I turn on autosave on VSCode?

To turn on or turn off the Auto Save feature in Visual Studio Code, go to File and click on Auto Save from the drop-down menu: The steps are completely the same in Windows and macOS. If you want to config the Auto Save behavior deeper, go to: Mac: Code > Preferences > Settings.

Does Visual Studio save automatically?

Starting with 17.2 Preview 1, the new autosave feature will help with this. Use Visual Studio Search (Ctrl+Q) and look for “autosave”. That will take you to the Environment\Documents page in Tools\Options.


2 Answers

Go to File-> Preferences ->settings

choose your auto save option from commonly used settings enter image description here

like image 184
Alex Varghese Avatar answered Oct 06 '22 12:10

Alex Varghese


As @Alex Varghese mentioned in his answer you can do it in the settings. One addition is even if you turn off the auto save option in your user settings, that will not over write the option you have under Workspace settings, so you have to do the changes there as well.

enter image description here

enter image description here

enter image description here

You can also do this changes by going to the settings.json which usually resides at C:\Users\user\AppData\Roaming\Code\User.

"files.autoSave": "off" 

To edit your Workspace settings, you need to edit the settings.json file which resides at the .vscode folder of your solution.

"files.autoSave": "off" 
like image 34
Sibeesh Venu Avatar answered Oct 06 '22 12:10

Sibeesh Venu