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

Add middle-click to close tabs #1351

Open
3 of 5 tasks
worker2011 opened this issue Apr 25, 2024 · 6 comments
Open
3 of 5 tasks

Add middle-click to close tabs #1351

worker2011 opened this issue Apr 25, 2024 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers medium_priority Medium Priority Issues

Comments

@worker2011
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is this feature provided in the master branch?

  • I have checked the changelog

The problem you are facing

When I had opened too much tabs, I want to close some of them. But I have to close them one-by-one, which is time consuming.

Describe the feature you'd like

Enable the function as in some browsers, close the tab if it has been double-clicked.

Describe alternatives you've considered

No response

Are you willing to contribute to this?

  • I'm ready to contribute to this (and will open a PR soon)
  • I'd like to have a try (with the help of the maintainers)
  • No, thanks

Anything else?

No response

@worker2011 worker2011 added the enhancement New feature or request label Apr 25, 2024
@ouuan
Copy link
Member

ouuan commented Apr 25, 2024

I have to close them one-by-one, which is time consuming

close the tab if it has been double-clicked

I don't understand how they are related. You still need to close them one by one even if you can double-click to close a tab. Do you mean double-clicking is quicker (because there is no need to locate the close button?)

For your information, you can right-click a tab and then close all other tabs / close all tabs to the left/right / close all saved tabs.

By the way, I don't think one would need a lot of tabs in competitive programming 🤔️

@ouuan
Copy link
Member

ouuan commented Apr 25, 2024

However, I propose that middle-click to close tabs could be a good to have. This seems like the default behavior in my Firefox and Chrome, instead of double-clicking.

ref: https://bugreports.qt.io/browse/QTBUG-82408

@worker2011
Copy link
Author

However, I propose that middle-click to close tabs could be a good to have. This seems like the default behavior in my Firefox and Chrome, instead of double-clicking.

But in some mouses like the magic mouse by apple, there is not any button, so it is impossible to use middle-click. However, it seems that double-click is suitable for every mouses and some people(like me)'s using habitat.

@coder3101
Copy link
Member

coder3101 commented Apr 25, 2024

A keyboard shortcut to close/skip tabs would be better. For closing all tabs (or based on direction), ouuan’s solution is best.

@ouuan
Copy link
Member

ouuan commented Apr 26, 2024

A keyboard shortcut to close/skip tabs would be better

There are Ctrl+w and Ctrl+Tab. I'm not sure if they are suitable for OP's workflow though.

@ouuan
Copy link
Member

ouuan commented Apr 26, 2024

But in some mouses like the magic mouse by apple, there is not any button, so it is impossible to use middle-click. However, it seems that double-click is suitable for every mouses and some people(like me)'s using habitat.

What about Chrome/Firefox/VS Code? I just want to follow the best practice.

There are close buttons and shortcuts, so I don't think this is too important. You just need to accept the small inconveniences if you want to use mice without middle-click, instead of preventing applications from using it for non-essential functionalities.

I don't like double-clicking to close as the default behavior. It looks easy to be triggered by mistake. Opt-in could be considered, but I would like to avoid too many setting options.

@ouuan ouuan changed the title Add double-click to close tabs Add middle-click to close tabs May 10, 2024
@ouuan ouuan added good first issue Good for newcomers medium_priority Medium Priority Issues labels May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers medium_priority Medium Priority Issues
Projects
None yet
Development

No branches or pull requests

3 participants