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.
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" }
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" }