Add Confirmation Dialog for "Close All Editors" Command

Open
#322,334 2 comments 0 reactions 1 assignee View on GitHub

@benibenj is already working on this.

Since Jun 22, 2026.

Assessment

This issue has not been assessed yet.

Description

under-discussion workbench-editors

Type: Feature Request

Feature Request

Problem

I occasionally trigger the "Close All Editors" command (Ctrl+K, W) by mistake. When this happens, all open editor tabs are closed immediately without any confirmation prompt. While tabs can often be restored, it can be disruptive, especially when working with many open files.

Proposed Solution

Add an optional setting that displays a confirmation dialog before executing the "Close All Editors" command.

Example:

"Are you sure you want to close all open editors?"

  • Close All
  • Cancel
Suggested Setting
"workbench.editor.confirmCloseAllEditors": true

The setting could be disabled by default to preserve the current behavior and enabled by users who prefer additional protection against accidental tab closure.

Benefits
  • Prevents accidental closure of all editor tabs.
  • Improves usability for users who frequently use Ctrl+K shortcuts.
  • Provides consistency with other confirmation dialogs available in VS Code.
  • Optional setting ensures no impact on users who prefer the current workflow.
Additional Context

This is particularly useful when working with many open files across multiple editor groups, where accidentally triggering "Close All Editors" can interrupt the current workflow.

VS Code version: Code 1.125.1 (fcf604774b9f2674b473065736ee75077e256353, 2026-06-19T08:39:34Z)
OS version: Windows_NT x64 10.0.26200
Modes:

System Info
Item Value
CPUs 13th Gen Intel(R) Core(TM) i7-13650HX (20 x 2803)
GPU Status 2d_canvas: enabled
GPU0: VENDOR= 0x8086, DEVICE=0xa78b [Intel(R) UHD Graphics], DRIVER_VENDOR=Intel, DRIVER_VERSION=32.0.101.7026 ACTIVE
GPU1: VENDOR= 0x10de, DEVICE=0x28e1 [NVIDIA GeForce RTX 4050 Laptop GPU], DRIVER_VERSION=32.0.16.1062
GPU2: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8521
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.71GB (3.16GB free)
Process Argv C:\Users\Littu\Documents\Office\Workspaces\sfs_uat.code-workspace --crash-reporter-id abfe7ad4-6071-4fa3-b9ad-4416af035bc5
Screen Reader no
VM 0%
Extensions (37)
Name Identifier Author Version
Go Outliner 766b.go-outliner 766b 0.1.21
PHP Intelephense bmewburn.vscode-intelephense-client bmewburn 1.18.5
JSON formatter clemenspeters.format-json ClemensPeters 1.0.3
Laravel goto view codingyu.laravel-goto-view codingyu 1.3.11
markdownlint davidanson.vscode-markdownlint DavidAnson 0.61.2
Composer devsense.composer-php-vscode DEVSENSE 1.71.18989
IntelliPHP - AI Autocomplete for PHP devsense.intelli-php-vscode DEVSENSE 0.12.17700
PHP devsense.phptools-vscode DEVSENSE 1.71.18989
PHP Profiler devsense.profiler-php-vscode DEVSENSE 1.71.18989
Git History donjayamanne.githistory donjayamanne 0.6.20
Protobuf VSC drblury.protobuf-vsc DrBlury 1.6.6
GitLens — Git supercharged eamodio.gitlens eamodio 18.2.0
Go golang.go golang 0.54.0
Todo Tree gruntfuggly.todo-tree Gruntfuggly 0.0.226
Lifeline: Clock & battery kjhx.vscode-lifeline kjhx 1.2.0
phpfmt - PHP formatter kokororin.vscode-phpfmt kokororin 1.2.71
Laravel laravel.vscode-laravel laravel 1.7.0
Rainbow CSV mechatroner.rainbow-csv mechatroner 3.24.1
Git Graph mhutchie.git-graph mhutchie 1.30.0
Container Tools ms-azuretools.vscode-containers ms-azuretools 2.4.5
Python Debugger ms-python.debugpy ms-python 2026.6.0
Python ms-python.python ms-python 2026.4.0
Pylance ms-python.vscode-pylance ms-python 2026.2.1
Python Environments ms-python.vscode-python-envs ms-python 1.36.0
Makefile Tools ms-vscode.makefile-tools ms-vscode 0.12.17
Chat Customizations Evaluations ms-vscode.vscode-chat-customizations-evaluations ms-vscode 1.0.7
Laravel Blade Snippets onecentlin.laravel-blade onecentlin 1.38.0
Laravel Snippets onecentlin.laravel5-snippets onecentlin 1.19.1
Material Icon Theme pkief.material-icon-theme PKief 5.35.0
Laravel Intelephense porifa.laravel-intelephense porifa 1.25.0
YAML redhat.vscode-yaml redhat 1.23.0
Laravel Artisan ryannaddy.laravel-artisan ryannaddy 0.0.33
vscode-pdf tomoki1207.pdf tomoki1207 1.2.2
Error Lens usernamehw.errorlens usernamehw 3.28.0
vscode-icons vscode-icons-team.vscode-icons vscode-icons-team 12.18.0
file-size zh9528.file-size zh9528 1.0.0
PHP IntelliSense zobo.php-intellisense zobo 1.3.3
A/B Experiments
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
6abeh943:31336334
envsactivate1:31505457
cloudbuttont:31379625
3efgi100_wstrepl:31403338
839jf696:31457053
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
8hhj4413:31478653
ge8j1254_inline_auto_hint_haiku:31490510
38bie571_auto:31478678
cp_cls_c_1081:31454833
conptydll_true:31498968
ia-use-proxy-models-svc:31452481
e9c30283:31461165
test_treatment2:31471001
46204921:31447328
idci7584:31464702
e3e4d672:31494082
ei9d7968:31496641
nes-extended-on:31455476
chat:31457767
8hig5102:31480529
89g7j272:31518289
7e187181:31503455
i2gc6536:31499202
52612955:31516516
ghj88844:31499326
ddid_t:31478206
hmra_i5g22:31518061
ja75b849:31536256
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
db5d2638:31499441
jb_cp_cls_c_632:31524806
b1ei0813:31506238
56dj4588:31512888
32d76977:31512328
ha629193:31508444
cdk-lw-on:31524445
2cfga817_c:31522397
jh5f2457_c:31534744
g4a0e106:31529594
prpt_srch:31518468
jbcp_cls_pctr_t:31531130
61138546:31518536
cp_intellij_c_nes:31533503
jf4hg949:31526829
nes-curr-leftover-2000:31530974
h561g132:31533256
sessions_3:31532893
chatquotatrajectorynudge-control:31537002
ihg5j128:31534457

Dominant language
TypeScript
Stars
193k
Forks
42.9k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode

All issues in microsoft/vscode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.