Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to close multiple tabs without moving the mouse after closing one #40290

Closed
maximilianschmitt opened this issue Dec 15, 2017 · 25 comments
Closed
Assignees
Labels
feature-request Request for new features or functionality on-testplan workbench-tabs VS Code editor tab issues
Milestone

Comments

@maximilianschmitt
Copy link

maximilianschmitt commented Dec 15, 2017

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).
@vscodebot vscodebot bot added workbench workbench-tabs VS Code editor tab issues labels Dec 15, 2017
@bpasero bpasero added feature-request Request for new features or functionality and removed workbench labels Dec 16, 2017
@bpasero bpasero removed their assignment Dec 16, 2017
@feargswalsh92
Copy link

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.

@maximilianschmitt
Copy link
Author

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

@bpasero bpasero changed the title UX Improvement: Don't resize tabs while closing Allow to close multiple tabs without moving the mouse after closing one Sep 14, 2018
@stclairdaniel
Copy link

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

@MichaelAldrich
Copy link

Would love an update on this.

@paweston70
Copy link

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.

@adamreisnz
Copy link

adamreisnz commented Jun 6, 2019

Atom implemented something similar here: atom/tabs#300

atom

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

@Kylar13
Copy link

Kylar13 commented Jun 13, 2019

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.

@bpasero bpasero added this to the Backlog milestone Oct 24, 2019
@Kenobi-the-2nd
Copy link

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.

@ian-h-chamberlain
Copy link

ian-h-chamberlain commented Jun 16, 2020

@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: CSCD01@5966234

@adamreisnz
Copy link

Moreover, this issue has 50+ upvotes too.

@kanlukasz
Copy link

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

@JohnRThomas
Copy link

Looks like it's been more than a year since this was last commented on. I'd like to see this feature too, any update?

@rohitghali
Copy link

Any update on this? Really frustrating managing tabs in vscode.

@kchoo1118
Copy link

Any updates?

@teejay-87
Copy link

I would add that, for this to function properly, all tabs should be the same size, otherwise you have long-name files' tabs longer than others, and you need to move the cursor left and right for each tab you want to close.

unnamed

I think having all tabs same size, like in Chrome, should be an option too.

@adamreisnz
Copy link

adamreisnz commented Jan 26, 2022

How can we put together/fund a bounty to have this issue fixed and addressed?

It has 90+ upvotes, and been open for almost 5 years, but still hasn't been picked up. At this point I am willing to pay for having this solved, as it drives me bonkers every time I want to close a set of tabs.

@ZioCain
Copy link

ZioCain commented Feb 22, 2022

Another solution could be having the close button on the left, like Opera browser does.
This way, no need to have tabs the same size, you don't have to move the mouse to close multiple tabs

@gjsjohnmurray
Copy link
Contributor

@ZioCain this is already an option: "workbench.editor.tabCloseButton": "left"

@starball5
Copy link

@jacekkopecky
Copy link
Contributor

@bpasero would it be OK if I pick up #40750 and bring it up to current vscode as a solution to this? Chrome-like nice responsive tabs don't seem to be in the pipeline, and recently every time I was irritated by the differently sized tabs, I thought that simply fixed-size tabs would be quite alright for me.

@bpasero
Copy link
Member

bpasero commented May 6, 2023

I cannot make any promises when or if at all I can look at it, but if we ever had an option for it, we should have it with the existing setting as a choice:

image

@jacekkopecky
Copy link
Contributor

@bpasero yes, it would be an option "fixed" in there, with a further option for the actual width the user wants.

jacekkopecky added a commit to jacekkopecky/vscode that referenced this issue May 6, 2023
This is meant at least partially to address microsoft#40290 and
is a continuation of the unfinished work from microsoft#40750.
@jacekkopecky
Copy link
Contributor

@bpasero maybe you can have a look at #181729? 8-) I know, no promises, and I do understand.

@bpasero bpasero self-assigned this May 22, 2023
@bpasero bpasero modified the milestones: Backlog, May 2023 May 22, 2023
bpasero added a commit that referenced this issue May 22, 2023
* Add settings for fixed-width tabs

This is meant at least partially to address #40290 and
is a continuation of the unfinished work from #40750.

* Only apply fixed width when the setting is on

* Implement chrome-like tab width behavior

Tabs shrink uniformly (down to a limit) but stay fixed-width
when the mouse is over the tab bar.

* Rename width setting to max width

* Make the ifs more readable

* Have event handlers only if the option is set

* 🎨

* Handle sizing artifacts present with wrapping tabs

To achieve this, it's best to remove the transition delay.

* Rename setting to apply only for fixed-sized tabs

* Set default fixed max tab width to 160px

* Minor code tweaks from review comments

* formatting

Co-authored-by: Benjamin Pasero <benjamin.pasero@gmail.com>

* Use disposable listeners

* Remove redundant check for last-in-row

* Apply fade gradient from shrink tabSizing to fixed

* Trying to make the code cleaner and understandable

* Remove transition

On advice of @bpasero, removed transition because
the editor doesn't really use transition that much.

* some cleanup

* fix typo

* Simplify workaround for the overflow issue

* 💄

* 💄

* Let the tabs fix their width before closing the editor

* 💄

---------

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
Co-authored-by: Benjamin Pasero <benjamin.pasero@gmail.com>
@bpasero
Copy link
Member

bpasero commented May 22, 2023

A new workbench.editor.tabSizing option fixed came in via #181729 that:

  • keeps tabs the same size irrespective to the content
  • keeps that size when closing a tab for as long as the mouse is over the tab bar

Thanks Jacek!

@bpasero bpasero closed this as completed May 22, 2023
@maximilianschmitt
Copy link
Author

This is amazing. Thanks @jacekkopecky and @bpasero!! 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-testplan workbench-tabs VS Code editor tab issues
Projects
None yet
Development

No branches or pull requests