Are you a GitHub.dev and/or Codespaces and/or vscode.dev user of Visual Studio Code in the browser? Are you also frustrated that Cmd+W (macOS) or Ctrl+W (Windows) closes the browser tab instead of the editor window? Re-bind workbench.action.closeActiveEditor
to something like Ctrl+Cmd+W. You’ll also find that it persists across sessions.
[
{
"key": "ctrl+cmd+w",
"command": "workbench.action.closeActiveEditor"
},
{
"key": "cmd+w",
"command": "-workbench.action.closeActiveEditor"
}
]