Skip to content
| Marketplace
Sign in
Visual Studio Code>Keymaps>Custom Close PromptNew to Visual Studio Code? Get it now.
Custom Close Prompt

Custom Close Prompt

cainaleao

|
1 install
| (1) | Free
Replaces the native save-changes prompt with a QuickPick where Enter saves, Space discards, and Escape cancels.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Custom Close Prompt

Replaces VSCode's native "save changes before closing?" dialog with a QuickPick — so keyboard navigation is predictable and Space always discards.

Why

Recent macOS updates changed the default button of the native save prompt to Cancel instead of Don't Save, breaking a long-standing muscle-memory flow (Cmd+W → Space to discard). VSCode's custom dialog defaults to Save. Neither restores the old behavior.

This extension intercepts Cmd+W on dirty files and shows a QuickPick where:

  • Enter — Save
  • Space — Don't Save
  • Escape — Cancel

Clean files close normally.

Install

From the marketplace: search for "Custom Close Prompt" and install.

Or install a local .vsix:

code --install-extension close-flow-<version>.vsix

Usage

Nothing to configure. Press Cmd+W on a dirty file — the QuickPick appears at the top of the window. Pick with the keyboard.

Limitations

  • The QuickPick isn't a centered floating modal — VSCode's extension API doesn't expose one. This is the closest visible alternative.
  • Currently macOS-only keybinding (Cmd+W). Windows/Linux binding not yet configured.

Development

npm install
npm run compile

Press F5 in VSCode to launch an Extension Development Host with the extension loaded.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft