How can we save all the files in Visual Studio Code like we do in Visual Studio by pressing Ctrl+Shift+S ?
16 Answers
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"
}
]

- 957
- 6
- 16

- 106,458
- 22
- 256
- 341
-
116The only 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 pressing `Ctrl` + `K` combination release the `Ctrl` key and press `S` separately. For cases where `Ctrl` key has to be kept pressed continuously it will be shown as e.g. `[Ctrl + K Ctrl + O]` (to open a new folder) in the menu item text . – RBT Jun 07 '17 at 08:57
-
15I'm a Windows user, I wonder why they choose such shortcut CTRL-K S,not the default Windows UX CTRL+SHIFT+S – Samih A Aug 20 '17 at 07:12
-
1If you're like me and can never remember those symbols, that's option+command+S – Kabir Sarin Mar 21 '20 at 18:41
-
Ctrl+Alt+S KO on my GNU Linux – moueza Oct 26 '21 at 07:47
-
On Ubuntu 20_04, Lubuntu flavor, `Ctrl+Alt+S` does not work, but File -Save All works. – Timo Jan 26 '22 at 09:16
-
How do I Save All but with format on save? – Aaron Franke Aug 23 '23 at 00:13
TL;DR: You can press Ctrl + K , S to save all open files with a little caveat associated with it.
Detailed Explanation: Be careful about keyboard shortcut combination shown in any menu description. There is a little caveat to it. The combination Ctrl + K S shown as menu description text (Refer screenshot below) gives an impression that we have to press Ctrl key, keep the Ctrl key pressed and then press the keys K and S one by one in 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 will appear twice in the menu description text. For example, to open a new folder, the menu item's text shows Ctrl + K Ctrl + O. In this case Ctrl modifier key is present twice (refer screenshot below).

- 24,161
- 21
- 159
- 240
-
5This did not work for me in Windows. In latest VS code (1.14.0) I had to press CTRL + K and then release *both* keys and then press S. If I just released the CTRL key then I'd still have K depressed and end up with dozens of K's inserted into the file and no save. I don't like this at all and will change the binding to something simpler if possible. – Norbert Norbertson Jul 12 '17 at 10:33
-
4This statement - `After pressing Ctrl + K combination release the Ctrl key and press S separately` means exactly what you are saying. It says after you pressed `Ctrl + K` combination and when you want to press `S` key then don't keep the `Ctrl` key pressed. Instead, release `Ctrl` key and then press `S` separately. We are usually habitual of keeping the `Ctrl` key pressed in Visual Studio which is not the case here. That is what I wanted to emphasize. Once you've pressed `K`key then of course you have to release it to press the next key `S`. You can't keep `K` pressed anyways :) – RBT Jul 12 '17 at 10:52
-
1Another note for vim plugin users -- to make the double-key hotkeys work, you need to disable handling them by the vim plugin, e.g. for `Ctrl+K S`: `"vim.handleKeys": { ..., "
": false }` – quezak Mar 19 '19 at 13:45 -
1
For windows user - Visual Studio Code has Ctrl + K , S
- Press Ctrl + K.
- Release the Ctrl and K both keys.
- Press S key.
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.

- 24,161
- 21
- 159
- 240

- 414
- 4
- 12
-
-
1@KashifFaraz then change it in the key bindings. File -> Preferences -> Keyboard shortcuts – Nyerguds Dec 15 '21 at 14:18
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:
- Press s.
This applies to other "Close Workspace" command that can be found in the "File" menu (instead of pressing s, you press f).

- 7,079
- 2
- 26
- 21
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"
}
]

- 13,139
- 9
- 69
- 97
-
1This worked the best for me. I just opened up Keyboard Shortcuts with ⌘+K ⌘+S, clicked the {} icon to open keybindings.json, and pasted in these four shortcut entries. Thanks! – Nick Litwin Jun 04 '19 at 19:01
-
I wonder why there are literally 3 commands listed for this in the key bind editor; "`saveall`", "File: Save All Files", and "Save All `workbench.action.files.saveAll`". – Nyerguds Dec 15 '21 at 14:20
I'm a jack of all trades developer, using lots of different tools and operating systems. I'm always nervous about blindly using keystrokes. I much prefer to use a simple "save all" button.
If you add "Open Editors" in your VS Code Explorer window, that selection includes a very handy "Save All" icon. Click the icon, and you are done.
No custom keystrokes required. No preferences to edit.

- 3,778
- 4
- 35
- 63
-
Oh, wow, I never knew that "open editors" option was available. That in itself is going to be super helpful. – Nyerguds Dec 15 '21 at 14:22
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.

- 7,102
- 69
- 48
- 77

- 41
- 3
-
Why the heck are there three separate ones listed in the key binds, though? – Nyerguds Dec 15 '21 at 14:21
To save all the files in VSCode(Windows),
Press Ctrl+K then Press the S.
All files will be saved.
To find other keyboard shortcuts or to change a shortcut,
Go to File -> Preferences -> Keyboard Shortcuts OR Press Ctrl+K+S
Select a keyboard shortcut and press Enter to update/change a keybinding
ctrl + shift + s
Is supported in latest versions My version is: 1.39.1
-
It didn't work for me. My OS is Windows 10 & VS Code version is *1.65.1*. It opens file explorere for - Save as! – ShaileshDev Mar 14 '22 at 05:26
-
ctrl + shift + s is for save as. It does n't save all files even in 1.39.1. – Mahantesh. N. Hadimani. Jun 09 '22 at 15:15
In your Visual Studio Code, on the left side there is EXPLORER and three dots. Click on them, check Open Editors. A small window with all open files will be opened (why do they call it Open editors and not open files??). When the mouse will be on that part, you will see the key Save All.
See pictures for more details

- 1,890
- 2
- 24
- 25
Install the extension: [IntelliJ IDEA Keybindings][1]
[1]: https://(https://marketplace.visualstudio.com/items?itemName=k--kato.intellij-idea-keybindings

- 699
- 5
- 13