Name it whatever you want, then click on "Select Folder". It will appear in the *Visual Studio Code explorer. Now from menu File → Save Workspace As.... Name the workspace and save it wherever you want to keep all your workspaces, (not necessarily where your project folders are).
It doesn't look like VS Code has a built-in single-press keyboard shortcut to save all open files on Windows.
The simplest way would be to use the menu accelerators: ALT+F, followed by ALT+L.
Alternatively, you can change the key binding by editing the keyboard preferences:
Add the binding to the right half of the screen, then restart VS Code:
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+shift+s",
"command": "workbench.action.files.saveAll"
}
]
⌥+⌘+S // macOS
Ctrl+K S // Windows
Ctrl+Alt+S // Linux
As of today you can press Ctrl + K , S to save all unsaved files currently opened in Visual Studio(VS) Code editor.
Word of caution: You need to be careful about keyboard shortcut combination present in description text of any menu item.
The trick to note here is that the command key combination Ctrl + K S shown with menu item text gives an impression that you have to press Ctrl key, keep the Ctrl key pressed and then press the keys K and S one by one in quick succession. This is not the case.
After having pressed Ctrl + K combination, you need to release both Ctrl and K keys and then press S key separately.
For cases where Ctrl key has to be kept pressed continuously, you'll notice that modifier keys (Ctrl or Alt) will appear twice in the menu description text e.g. to open a new folder, the menu text description reads Ctrl + K Ctrl + O as shown in the screenshot below:
For windows user - Visual Studio Code has Ctrl + K , S
This will Save all modified files in one go. Release is the main point as new user press S key with Ctrl key which opens key board shortcuts file.
For Windows users, the key shortcut is displayed as the 11th option in the "File" menu as:
Save All Ctrl + K S
The key shortcut displayed equates to the following:
Press Ctrl + k
Release the Ctrl and k keys.
Notice the bottom of your window will display a message asking for a second key like this:
This applies to other "Close Workspace" command that can be found in the "File" menu (instead of pressing s, you press f).
This keybindings.json switches the Save All
and Save
shortcuts so that Cmd+S is bound to Save All
:
[
{
"key": "alt+cmd+s",
"command": "workbench.action.files.save"
},
{
"key": "cmd+s",
"command": "-workbench.action.files.save"
},
{
"key": "cmd+s",
"command": "workbench.action.files.saveAll"
},
{
"key": "alt+cmd+s",
"command": "-workbench.action.files.saveAll"
}
]
First of All, I want you to check, What is your VS Code default shortcut for 'Save All' files
Step 1: Open VS Code> 'File' Tab > 'Preferences'> ClickOn 'Keyboard Shortcuts'
Secondly, I want you to search for 'Save All' Shortcut.
Step 2: Type 'Save All' in Search Field
Third, you will see that shortcut keybinding to the 'Save All' Command.
Step 3: You can also change the keybinding to it. Just clicking on it and adding controls of your choice and then press enter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With