visual-studio-codesettingscontextmenu

Adding "Close to the Left" to the tabs context menu in VS Code


When you right click on any tab, two of the available options in the context menu are "Close others" and "Close to the Right".

The current context menu.

I've dug in the VS Code source code and found a trace for closing to the left including tests.

Why isn't it present in the context menu? Is it possible that they only added the functionality without adding an option in the context menu?

I've tried searching for it in the settings but couldn't find any options.


Solution

  • There are at least a couple of issues on it:

    1. Close editors to the left
    2. Enabling "Close all to the left" in tab context menu

    but none of them have gotten enough votes to get to the Backlog. It would be easy to make an extension to add that command to the context menu.

    Also there is an unbound command for it: View: Close Editors to the Left in Group.