How to save the entire project using Visual Studio Code

Asked

Viewed 5,772 times

1

all right?

I’m using Visual Studio Code, and when I change three files, I have to go from file to file to save each individually.

Is there any command on Visual Studio Code to save all the project at once?

2 answers

4

You can enable the Auto save on the menu File.

Also on the menu File has the option of Save All, that would be the combination of shortcut Ctrl + K S.

But to function you have to press the Ctrl + K, release Ctrl + K and presuppose the S.

The combination Ctrl + K Ctrl + S is to open the Keyboard Shortcuts, this is where you can customize the Vscode shortcuts. Try changing the option Save All for something that is easier for you to use.

  • I didn’t understand, if I type Ctrl + k + S a shortcut appears for all the command lines, if I type Ctrl + k nothing happens and if I type Ctrl + S only saves the corresponding file. How should I type?

  • I tested your suggestion and we both know it doesn’t work, you didn’t even test your suggestion.

  • @wladyband works yes, you who did not know how to use the command.

  • @wladyband as the colleague spoke [Ctrl] + [k], release and then tighten the [S]

4


There is another option, which would be you to configure the "Auto Save" VS Code. So your files will always be saved without any commands

Go on File > Preferences > Settings and then search for "auto save"

inserir a descrição da imagem aqui

In the option 'onFocusChange' for example anywhere you click outside the window it will save itself, including switching from one tab to another.

If you choose the option of "afterDelay" it by default saved every 1000ms, but vc can configure as in the example below.

"files.autoSave": "afterDelay",
"files.autoSaveDelay": 500,

The advantage of this method is that if you close the program or run out of light it will save the information by itself

Link to the official documentation: https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save

Browser other questions tagged

You are not signed in. Login or sign up in order to post.