Home >Development Tools >VSCode >How to configure the 'auto-save' code function in VSCode (step sharing)

How to configure the 'auto-save' code function in VSCode (step sharing)

青灯夜游
青灯夜游forward
2022-05-18 20:37:568851browse

How to configure the "auto-save" code function in

VSCode? The following article will introduce to you how to set up automatic saving code in VSCode. I hope it will be helpful to you!

How to configure the 'auto-save' code function in VSCode (step sharing)

Sometimes we forget to save when writing code, and at this time the computer freezes and freezes. If we restart the computer and open VSCode, our code will still be there. Have it? The answer is: unfortunately, no more.

At this time we can set "auto save" in VSCode. [Recommended learning: "vscode Getting Started Tutorial"]

How to set up automatic code saving in VSCode

1. Click settings in the lower left corner of the VSCode interface:

#2. Enter auto save

in the search box

3. The first one we see is the function we need. VSCode has several different settings:

1) Default Set off, do not automatically save:

##2) afterDelay - will automatically save as the saved editor after the configured "#files.autoSaveDelay#":

3) onFocusChange - When the editor loses focus, it will be automatically saved as the saved editor (can be understood as when the mouse is not in VSCode):

4) onWindowChange - When the window loses focus, it will be automatically saved as the saved editor (the window can be understood as each code script, when the mouse moves from A script to B script, it will be automatically saved Modifications of script A)

Above, problem solved~

For more related knowledge about VSCode, please visit:

vscode tutorial!

The above is the detailed content of How to configure the 'auto-save' code function in VSCode (step sharing). For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete