How-to · VS Code for Mac

How to turn on auto save in VS Code on Mac: File menu steps for 2026

To turn on auto save in VS Code on Mac, open the File menu and click Auto Save. VS Code then saves each file about one second after you stop typing, so you can stop pressing ⌘S for routine saves.

Updated Checked against VS Code on macOS, Apple silicon and Intel, current stable builds3 minEasy

Person typing on a laptop, representing how to turn on auto save in VS Code on Mac
Typing on a laptop, where auto save keeps your edits on disk. · Image by StartupStockPhotos from Pixabay

Quick answer

  • Open File > Auto Save in the Mac menu bar to turn it on.
  • The default delay is 1000 ms, which is one second after you stop typing.
  • Set files.autoSave to afterDelay in Settings to get the same result with more control.
  • Check .vscode/settings.json in the project if auto save still does not save.

What you need

  • A Mac running macOS with Visual Studio Code installed
  • A recent stable build of VS Code. The current stable release is 1.145, released November 4, 2026
  • A file already saved on disk to test the save behavior
  • Access to the project folder if you want to check a workspace setting

How to Turn on Auto Save in VS Code on a Mac in VS Code on a Mac

  1. Make sure VS Code is the front app

    ⌘Tab

    Click the VS Code window, or press ⌘Tab until VS Code is active. The menu bar at the top of the screen should now show the VS Code menus.

  2. Open the File menu

    File

    Click File in the menu bar at the top of the screen. The File menu drops down with the save items and the Auto Save item.

  3. Click Auto Save

    FileAuto Save

    Click Auto Save. VS Code sets files.autoSave to afterDelay, so it saves a file a short time after you stop typing.

    Tip: The official docs call this the easiest way to turn it on, so you do not need to edit any settings file.

  4. Check the menu state

    FileAuto Save

    Open the File menu again. If Auto Save has a checkmark beside it, the setting is on. The docs do not describe the checkmark in detail, so run the test in the next step to be sure.

    Tip: If the checkmark and the behavior disagree, trust the behavior.

  5. Test it on a saved file

    Open a file you have already saved. Type a few characters, then stop for about a second. The dot on the file tab should clear without you pressing ⌘S.

  6. Open Settings

    FilePreferencesSettings⌘,

    Press ⌘, to open the Settings editor. Search for files.autoSave to see the current save trigger, then search for files.autoSaveDelay to see the delay.

    Tip: The official docs list this menu path. Some guides show Settings under the Code menu, so check your menu bar. ⌘, works either way.

  7. Pick a save trigger

    Set files.autoSave to afterDelay for timed saves. Use onFocusChange to save when focus leaves the editor, or onWindowChange to save when focus leaves the window.

  8. Set the delay in milliseconds

    Set files.autoSaveDelay to a number. The value is in milliseconds, and the default is 1000, which is one second. Raise the number to wait longer before a save.

  9. Open user settings as JSON

    ⇧⌘P

    Press ⇧⌘P to open the Command Palette. Type Preferences: Open User Settings (JSON) and press Return to open the file.

  10. Add the two keys

    Inside the braces, add a line for files.autoSave with the value afterDelay, and a line for files.autoSaveDelay with the value 1000. Put a comma after every line except the last one.

  11. Save the settings file

    ⌘S

    Save settings.json with ⌘S. Then repeat the test from the Test it step to confirm the change works.

  12. Check for a workspace override

    If the setting seems to do nothing, open the project's .vscode folder and look for settings.json. A workspace value for files.autoSave overrides your user setting.

Auto save is off until you switch it on. VS Code expects you to save by hand, and on a Mac that means ⌘S. Most people forget that step at some point. A stray app switch can cost you a block of typing if the file never reached the disk. Auto save covers that gap by writing your changes for you.

Person typing on a laptop, representing how to turn on auto save in VS Code on Mac
Typing on a laptop, where auto save keeps your edits on disk. · Image by StartupStockPhotos from Pixabay

Turn on auto save from the File menu

The fastest route is the File menu. The official Basic editing docs call File > Auto Save the easiest way to turn it on. The item works as a switch. Turn it on and VS Code saves on a timer. Turn it off and the timer stops. You never open a settings file to use it.

The toggle changes one setting, files.autoSave. It sets that value to afterDelay. The rest of your settings stay the same, so you can come back to the menu later without undoing other choices.

Choose a save trigger that fits how you work

Auto save has four values, and the menu toggle only covers one of them. The table shows what each value does and who it suits.

The four values of files.autoSave, from the official docs.
ValueWhen VS Code savesBest for
offNever on its own. You save with ⌘SPeople who want full manual control
afterDelayAfter the delay in files.autoSaveDelay, 1000 ms by defaultMost people, and the File > Auto Save toggle
onFocusChangeWhen focus leaves the editorPeople who jump between the editor and other panels
onWindowChangeWhen focus leaves the VS Code windowPeople who switch to a browser or chat app often

afterDelay is the one most people want. The timer resets each time you type, so VS Code waits for a pause before it writes. With the default of 1000 ms, a pause of one second triggers the save. The file on disk stays a little behind your typing, but only by that pause.

onFocusChange and onWindowChange work differently. They do not save while you type. They save when you move somewhere else. They suit people who switch between the editor, a terminal, a browser, and a chat app many times a day.

Set the delay and see what it does

The delay lives in files.autoSaveDelay and is measured in milliseconds. The default is 1000. A higher number waits longer before it writes. A lower number writes sooner, which protects more of your work but also means more writes to disk.

Here is a common case. You write a function in a Python file, pause to check a variable name, and keep typing. If your pauses are shorter than one second, VS Code keeps waiting. The save happens only when you stop for the full delay.

Change the value in small steps and test each one. Type a sentence, stop, and watch how long the dot on the tab takes to clear. If the wait feels too long or too short, adjust and test again. There is no single right number. Pick the one that matches your pauses.

Programmer at a desk writing code, the setting for how to turn on auto save in VS Code on Mac
Editing code at a desk, the setup where auto save helps most. · Image by Innovalabs from Pixabay

Edit settings.json when you want full control

The JSON route puts every auto save option in one file. Open Settings with ⌘, and search for files.autoSave to see the current value. For the raw file, run the Command Palette command Preferences: Open User Settings (JSON). User settings apply to every project on your Mac.

Workspace settings are a separate file. They live in the .vscode folder inside a project, and they override your user settings. A project can quietly turn auto save off. If your change does nothing, check that folder first.

Mac laptop on a desk, a typical setup for learning how to turn on auto save in VS Code on Mac
A Mac on a desk, the usual place to set up VS Code. · Image by StartupStockPhotos from Pixabay

Auto save for some folders and languages

VS Code 1.86, released in January 2024, let you set every Auto Save option per folder or per language. The official docs show an example that turns auto save off for LaTeX files. That pattern helps when one file type needs manual saves while the rest of your project saves on its own.

Two more settings narrow the rule. files.autoSaveWhenNoErrors skips auto save when a file has error markers. files.autoSaveWorkspaceFilesOnly limits auto save to files inside the workspace, so files you open from elsewhere stay under manual control.

Common mistakes with auto save

The first mistake is assuming auto save commits to Git. It writes files to disk. It does not record a commit. If you want a history, commit on your own schedule. The Git setup guide walks through that part.

The second mistake is treating auto save as undo. It saves whatever state the file is in. If a half-finished edit breaks your code, auto save writes that break to disk too. Use Undo with ⌘Z to back out the edit, and commit your work as checkpoints.

The third mistake is trusting the menu checkmark alone. Test with a real edit. Type, pause, and watch the tab. That check takes only seconds and tells you more than the menu does.

The fourth mistake is pressing ⌘S out of habit and assuming it is wasted. It is not. A manual save still helps when you want the file written at an exact moment, such as right before you run a script.

Auto save in VS Code for the web

The browser version at vscode.dev handles auto save differently. When it is on, auto save applies to local files. Edits to a remote repository stay in browser local storage until you commit them. A change that looks saved in a remote repo is not in the repository yet. Commit it to make it permanent.

Check your version before you search for the item

The current stable release is VS Code 1.145, released November 4, 2026. Its release notes do not mention Auto Save, files.autoSave, or File menu changes. The last documented Auto Save change is in the 1.86 release notes from January 2024.

If your File menu looks different from this guide, update VS Code first. Then compare the menu with the official docs. The docs give the Settings path as File > Preferences > Settings, but some Mac menus show it under Code. Use ⌘, to skip the guesswork.

Turn auto save off again

Open File > Auto Save and click it again to switch it off. You can also set files.autoSave to off in settings. Either way, your files go back to manual saves, and ⌘S saves them as before.

Where to go next

Once auto save runs, you may want to tune the rest of your editor. Read how to toggle the integrated terminal in VS Code on Mac next, or set up Git in VS Code on Mac so your saved files get committed. The VS Code page lists more guides for the same app.

VS Code shortcuts for this on Mac

VS Code keyboard shortcuts on Mac
To do thisPress
Save the active file by hand⌘S
Open Settings⌘,
Open the Command Palette⇧⌘P
Undo the last edit⌘Z

If it does not work

Auto Save is on but files still do not save
Check for a workspace setting. Open .vscode/settings.json in the project and look for files.autoSave set to off. Workspace settings override user settings, so that value wins.
Saves stop when a file shows errors
Check files.autoSaveWhenNoErrors. When it is on, a file with error markers is not saved automatically. Fix the errors, or turn that setting off if you want saves anyway.
A settings change does nothing
Check that settings.json has valid syntax, with commas between lines and matching quotes. A syntax error can cause a setting to be ignored. Fix it, save the file, and test again.
Auto save does not seem to save on vscode.dev
On the web version, auto save applies to local files. Edits to a remote repository stay in browser local storage until you commit them. Commit the changes to write them to the repository.
The Auto Save item is missing from the File menu
Make sure VS Code is the front app, then open File again. If it is still missing, update VS Code, compare your version with the current stable release, and use the files.autoSave setting instead.
The checkmark and the behavior disagree
Trust the behavior. Type a few characters in a saved file, pause, and watch whether the dot on the tab clears. Reports exist of the web build's checkmark not updating, so the test is the better check.

Faster with Lazur

Do it faster: ask Lazur while you are in VS Code

Hold ⌥ ⌘ and say what you want. Lazur sees your VS Code window. Lazur draws a circle and a label around the button or menu you need.

  • 1

    Hold ⌥⌘ and talk

  • 2

    Lazur draws a circle and a label around the button or menu you need.

  • 3

    You stay in VS Code. Nothing to copy into a chat window.

Free for 3 days, then $18/month. Download for Mac

You say“Where's Auto Save in this menu?”

Lazur · points at itLazur circles the Auto Save item in the File menu and labels it on screen.

VS Code
ExplorerSearchAuto SaveRight hereSource ControlRun

Questions people ask

Is auto save on by default in VS Code on Mac?

The official docs do not state the default value of files.autoSave. Saving is explicit by default, so ⌘S is the save command. Check File > Auto Save or your settings to see what your install uses.

Is there a keyboard shortcut to turn on auto save on a Mac?

The docs do not document a macOS shortcut that toggles Auto Save. Use the File menu, or change files.autoSave in Settings, which opens with ⌘,. ⌘S still saves a file by hand.

How long does auto save wait before it saves on a Mac?

With the afterDelay value, the default wait is 1000 ms, which is one second. Change it with files.autoSaveDelay in Settings. The value is in milliseconds, so a higher number waits longer.

Does auto save commit my changes to Git?

No. Auto save writes files to disk. A Git commit is a separate step you take in the Source Control view or in a terminal. The Git setup guide covers the commit flow.

Why did auto save stop working after I turned it on?

The usual causes are a workspace setting that sets files.autoSave to off, error markers when files.autoSaveWhenNoErrors is on, and a syntax error in settings.json. Work through the troubleshooting steps on this page in that order.

Can I use auto save for some files only?

Yes, since VS Code 1.86 in January 2024. Auto Save settings can be set per folder or per language. The files.autoSaveWorkspaceFilesOnly setting also limits auto save to files inside the workspace.

Does auto save work in VS Code for the web?

It applies to local files when auto save is on. For remote repositories, edits stay in browser local storage until you commit them.

Which VS Code version should I use?

Use the current stable release, 1.145, released November 4, 2026. Its release notes do not mention Auto Save. The docs describe the File menu toggle, so a current build should have it.

Sources

  1. Basic editing - Visual Studio Code docs · Microsoft · checked 2026-11-09
  2. User and Workspace Settings - Visual Studio Code docs · Microsoft · checked 2026-11-09
  3. January 2024 (version 1.86) release notes · Microsoft · checked 2026-11-09
  4. Visual Studio Code 1.145 release notes · Microsoft · checked 2026-11-09
  5. VS Code for the Web - Visual Studio Code docs · Microsoft · checked 2026-11-09

Try Lazur free for 3 days

Hold a key and ask. Lazur sees your screen, points at the button and talks you through it, in any Mac app. No credit card.