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

Feature request: warning for closeTabsOnRight and closeTabsOnLeft and closeOtherTabs. #4248

Closed
politicus opened this issue Apr 18, 2023 · 3 comments

Comments

@politicus
Copy link

Just experienced this: I lost (closed) around 20 tabs I opened since yesterday morning using one of my fine tuned Vimium keyboard shortcut.

So I was wondering if, besides setting one harder to use keyboard shortcut, there was a way to warn the user to perform a potentially damaging action when using closeTabsOnRight and closeTabsOnLeft and closeOtherTabs.

Thank you.

@HamzaMateen
Copy link

This would actually be an awesome feature for sure!

@philc
Copy link
Owner

philc commented Aug 13, 2023

There is functionality in Vimium to warn if a command looks like it has been mistakenly repeated. This warning check only applies to some commands:

openCopiedUrlInNewTab (20)
createTab (20)
duplicateTab (20)
removeTab (20)
restoreTab (20)

closeTabsOnRight and closeTabsOnLeft could be added to that list.

However, this repeat limit was added for the above commands because it almost never makes sense to repeat those commands many times. In contrast, for closeTabsOnRight, you often do want to close a long list of tabs. If you make a mistake, you can recover by (laboriously) using restore tab many times.

So I think it makes sense for the above list to have a repeat limit, but to exclude closeTabsOnRight from this list.

Related: once #4296 is merged, you can implement this yourself for closeTabsOnRight and closeTabsOnLeft (but not closeOtherTabs) by adding a "count=n" to your key mapping. Then, at most n tabs will be deleted.

@philc philc closed this as completed Aug 13, 2023
@politicus
Copy link
Author

@philc First of all my apologies for my late reply, I am not an expert at using github.com and just didn't you posted one.

About your answer. Thank you for your complete answer! That completely makes sense and thank you for the hint about "count=n". I see a lot of potential in my daily use!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants