Vscode: Allow to close multiple tabs without moving the mouse after closing one

Created on 15 Dec 2017  Â·  11Comments  Â·  Source: microsoft/vscode

Hi! I love the new shrink tab sizing in the latest version of Code. It feels much more natural to me because I now have a much better idea of which editors are open in which pane and how many are open in total.

There's an awesome thing that Chrome does when you're closing tabs – it doesn't resize the tabs while you're closing them. This allows you to close many tabs by just clicking repeatedly. It's a small details but it makes the experience a lot smoother in my opinion:

close-multiple-tabs-chrome

For comparison, here is how closing multiple tabs currently behaves in VS Code:

close-multiple-tabs-code

I think the behaviour is something like this:

If the user just closed a tab by clicking, and there is a tab to the right,
don't resize the tabs until the user moves the mouse pointer out from the tabs bar.

When you close a tab that is currently active, select the tab
to the right next (not the previously selected tab).
feature-request workbench-tabs

Most helpful comment

There is an alternative - workbench.editor.tabCloseButton can be positioned on the left, that way the mouse pointer always remains in the same place, but a user naturally gravitates to the right to close a tab, so it would be quicker, but just slightly annoying.

All 11 comments

This doesn't exactly solve this problem but in case you didn't know VSCode supports the Cmd+W keyboard shortcut that I use in chrome to close multiple tabs in a row. This helps me a lot with closing a bunch at once.

Thanks @feargswalsh92, I use that shortcut all the time but sometimes using the mouse is more convenient. :)

Is there any update here? I couldn't find any recent conversations but this is something that still bugs me.

Would love an update on this.

There is an alternative - workbench.editor.tabCloseButton can be positioned on the left, that way the mouse pointer always remains in the same place, but a user naturally gravitates to the right to close a tab, so it would be quicker, but just slightly annoying.

Atom implemented something similar here: https://github.com/atom/tabs/pull/300

atom

I've moved to VS Code from frustration with Atom's slowness, but this feature is a +💯

I'd love this feature!
The close button to the left feels plain wrong, and the Cmd + W shortcut is not the same behavior, since for example I usually do this when I wanna close all tabs but one, and Cmd + W will close a tab and focus the last open one, and while this is usually the desired behavior, it's not what you'd want in this use case.
Cmd + W and Ctrl + Tab just feels clunky.

For those of you looking for similar functionality (i.e., selection of multiple tabs), please see the feature request here, and upvote it if you would like to see this feature added.

@Kenobi-the-2nd That issue was automatically closed and conversation locked, but it appears to have received the requisite number of votes (21 of 20 required) for consideration in the backlog. Do you know if there is a way to have it reopened for consideration? I would love both that functionality and the one described in this issue, but it seems that is no longer a possibility 😞

It appears that someone even made an attempt to implement it (!) based on the linked commit: https://github.com/CSCD01/vscode-team19/commit/5966234e49942a48e8bf1e01f45640a08bf4e6bf

Moreover, this issue has 50+ upvotes too.

If you want to close the tab by tab and not move the cursor, you can use the middle mouse button (clickable scroll button). You can click anywhere on the tab and then it will close.
Of course, this is a half-way solution, but better than nothing

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chrisdias picture chrisdias  Â·  3Comments

VitorLuizC picture VitorLuizC  Â·  3Comments

trstringer picture trstringer  Â·  3Comments

borekb picture borekb  Â·  3Comments

biij5698 picture biij5698  Â·  3Comments