Vscode: VS Code shouldn't close when closing last editor via Cmd+W

Created on 4 Jan 2016  路  2Comments  路  Source: microsoft/vscode

I'm used to close all open MDI windows by holding down the CTRL+F4 keyboard shortcut. Doing this in VS Code also exits the program, which becomes quite a nuisance over time.

Exiting the program window should be restricted to happen only when using the ALT+F4 keyboard combination. This would also follow Microsoft Style Guidelines.

feature-request verification-needed verified

Most helpful comment

Given https://github.com/Microsoft/vscode/issues/8715 is fixed for July, you can prevent the window from closing by setting the following in the keybindings configuration:

{ "key": "cmd+w", "command": "-workbench.action.closeWindow", "when": "!editorIsOpen" }

All 2 comments

Prior art: Firefox controls this with a "browser.tabs.closeWindowWithLastTab" option. Should default to true on Mac and Linux.

Given https://github.com/Microsoft/vscode/issues/8715 is fixed for July, you can prevent the window from closing by setting the following in the keybindings configuration:

{ "key": "cmd+w", "command": "-workbench.action.closeWindow", "when": "!editorIsOpen" }

Was this page helpful?
0 / 5 - 0 ratings