vimium icon indicating copy to clipboard operation
vimium copied to clipboard

Feature request: closing tabs in `T` dialog

Open agzam opened this issue 8 years ago • 25 comments

Would be awesome to be able to close any tab right in T window

agzam avatar Mar 30 '16 22:03 agzam

For your information, it's a duplicate of #1735 and #1863. They were closed as lack of interest, though I personally think it's useful to me.

gqqnbig avatar Apr 25 '16 23:04 gqqnbig

Not sure why #1735 was evaluated as lack of interest, given all the comments there seem to support the idea. Should we post +1s to show interest?:wink:

innaterebel avatar Apr 26 '16 19:04 innaterebel

Can we please reconsider this? It is very useful and it can make us remove other extensions for tabs management.

I have the following idea for the key combination problem:

If the input does not have a selection of text, then SHIFT-DEL closes the focused tab (otherwise it does as expecting, deleting the selected text):

image

So, by simply pressing SHIFT-DEL, the tab closes and the next tab is focused in the list.

And so on.

I believe this (or any other variation you can think of) is pretty fast and does not seem to interfere with other shortcut actions.

What do you think?

P.S. The info text could also change, based on the state of input text (having a selected section or not): Use SHIFT-DEL to close the focused tab (as no text is currently selected) OR SHIFT-DEL will delete the selected text (focused tab will not close)

afilp avatar Jan 18 '19 13:01 afilp

@afilp I think this is reasonable, but I guess it would have to work for bookmarks and history too.

smblott-github avatar Jan 18 '19 13:01 smblott-github

@smblott-github Yes, it can do the same, maybe with an alert warning in the case of bookmarks deletion.

Also, for safety in accidentally hitting the SHIFT-DEL we could require a double press of SHIFT-DEL (sequentially). Not sure if this is needed though.

afilp avatar Jan 18 '19 16:01 afilp

@smblott-github I actually just had the need to delete a bookmark straight from the b dialog, see screenshot below:

image

afilp avatar Feb 10 '19 12:02 afilp

I would find this very useful. Recently I somehow got a gigantic URL recorded in my history, and it matches pretty much any query I type into the open URL dialog, and that's the most convenient place to purge it from my history.

I've also found that some low-signal webpages consistently rank highly in my most frequent searches, and it would be convenient to just delete them from the open URL dialog when I see them cluttering up the search results.

On Sun, Feb 10, 2019 at 4:55 AM afilp [email protected] wrote:

@smblott-github https://github.com/smblott-github I actually just had the need to delete a bookmark straight from the b dialog, see screenshot below:

[image: image] https://user-images.githubusercontent.com/7850073/52533963-e20be580-2d43-11e9-94b8-e4322b4177ec.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/philc/vimium/issues/2078#issuecomment-462130425, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAhlkVnUTwBwC4_26AXeHTxehM44N-Hks5vMBbBgaJpZM4H8PcE .

philc avatar Feb 11 '19 07:02 philc

I also miss this feature very much. Could it be implemented for recent tabs only as a first step (without bookmarks and history for now)?

balta2ar avatar Mar 20 '19 20:03 balta2ar

Implementing this would allow me to remove another plug-in that I use for similar functionality.

IzakMarais avatar Sep 05 '19 06:09 IzakMarais

FYI, this feature is implemented in Vimium-C alternative plugin, I switched to it, and experience has been great so far.

balta2ar avatar Sep 05 '19 06:09 balta2ar

#3170 is also expecting this.

gdh1995 avatar Sep 05 '19 06:09 gdh1995

@balta2ar I switched to Vimium-C. I believe Vimium-C has more features than I can imagine, but it lacks documentations at least on this shift-delete feature.

gqqnbig avatar Sep 05 '19 07:09 gqqnbig

@balta2ar How is it implemented there? I went to read the description there and could not find if this is supported.

afilp avatar Jan 16 '20 18:01 afilp

@afilp you may try Shift+Delete to delete a tab/history item on Vomnibar of Vimium C.

gdh1995 avatar Jan 17 '20 02:01 gdh1995

@aflip Yes it is not documented, but as Dahan says, Shift+Delete works.

IzakMarais avatar Jan 17 '20 10:01 IzakMarais

I think Shift+Delete is not very convenient keybinding for Mac users, because it forces you to press Fn+Shift+Delete (without Fn, Delete works as Backspace). It makes it even harder if you use an external keyboard that doesn't even have Fn key, e.g.: Kinesis Advantage.

Is it possible somehow to rebind that action to be something else, maybe Ctrl+D?

agzam avatar Jan 29 '20 06:01 agzam

@smblott-github Would you like to consider the "Shift-Del" (or ctrl+D for MAC) addition in the extension? Just for the loaded tabs for now, I have tons of loaded tabs and it would be really helpful to search, find those that I do not need and quickly press "Shift-Del" to close them. Thanks!

afilp avatar Feb 24 '20 12:02 afilp

I'll take a look at this at some point; I would love this feature. The problem with ctrl-D is that it's bound on Mac as forward-delete, which I use all the time. As a mac user, I would be thrown off and annoyed if that was overwritten by Vimium.

On Mon, Feb 24, 2020 at 4:41 AM, afilp < [email protected] > wrote:

@ smblott-github ( https://github.com/smblott-github ) Would you like to consider the "Shift-Del" (or ctrl+D for MAC) addition in the extension? Just for the loaded tabs for now, I have tons of loaded tabs and it would be really helpful to search, find those that I do not need and quickly press "Shift-Del" to close them.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub ( https://github.com/philc/vimium/issues/2078?email_source=notifications&email_token=AAACDFQ5WMZPRNGL3QWGDETREO56LA5CNFSM4B7Q64CKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMXUM6Y#issuecomment-590300795 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AAACDFVOBIRZ2RIMM4WI5SLREO56LANCNFSM4B7Q64CA ).

philc avatar Feb 25 '20 01:02 philc

We can add support for mapkey to Vomnibar, and Shift+Delete can be the default, so users can use whatever they like to do so.

There's a similar issues named question: is it possible to remap vomnibar's shift+delete in https://github.com/gdh1995/vimium-c/issues/112 .

I also recommend per-mode mapkey like mapkey <m-d:o> <s-delete> (map Meta+D to it): https://github.com/gdh1995/vimium-c/issues/110#issuecomment-580088981 .

gdh1995 avatar Feb 25 '20 04:02 gdh1995

@gdh1995 Is this useful feature implemented for bookmarks? Or maybe with another way? Thanks a lot! https://github.com/philc/vimium/issues/2078#issuecomment-462130425

afilp avatar Apr 17 '23 14:04 afilp

I think bookmarks are more important than history, so we should avoid mistaken deleting.

---Original--- From: @.> Date: Mon, Apr 17, 2023 22:42 PM To: @.>; Cc: "Dahan @.@.>; Subject: Re: [philc/vimium] Feature request: closing tabs in T dialog(#2078)

@gdh1995 Is this useful feature implemented for bookmarks? Or maybe with another way? Thanks a lot! #2078 (comment)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

gdh1995 avatar Apr 17 '23 17:04 gdh1995

@gdh1995 In my use case, it is very difficult to press SHIFT-DEL by mistake. I find it very low risk.

Is it possible to have an option in settings?

[ ] Allow SHIFT-DEL to delete the selected bookmark

The default can be false, so it is not a problem for those that do not want it. But it will be great for us that want it.

Thanks!

afilp avatar Apr 26 '23 20:04 afilp

I've been trying to figure out how to accomplish this and finally got around to searching here to find that it can't be done.

It would be really useful and give me more of the feel that I'm in a terminal/termux, but overall, just make it so much easier to manage my tabs without having a seperate extention for it or trying to manually navigate through tabs that I don't expect I need anymore. Here is what I currently use, but I'd love to remove an extra extension (even though it's a good one, but I prefer vimium):

https://github.com/philc/vimium/assets/11251306/ca97add6-4e07-4614-859d-3b2c23064013

Here is a similar situation (session which is more like a window than tab, but reminds this reminds me of what I want to do with vimium) in termux that provides a confirmation when closing when I have seperate windows:

https://github.com/philc/vimium/assets/11251306/e5a5966b-a3b8-486e-830f-b8b682b90fe3

Edit: I am already using Vimium-C, so my comment above isn't as applicable. I realized I have shift + delete mapped to something else already using autohotkey which was causing it not to work. I guess I'll keep this here as it is really useful feature to have and don't see why it shouldn't be in Vimium as well.

kkuhle avatar Oct 19 '23 20:10 kkuhle

@afilp Um, what I worried is such a case:

  1. I want to delete some bookmarks, so type a few words to query it
  2. I press Up / Down keys to select a suggestion
  3. I press Shift+Delete and get the suggestion deleted
    1. in my imagination, Vomnibar should refresh the list and the item will disappear
  1. But, I suddenly notice that I deleted a wrong suggestion next/previous to a real target
  2. There's no way to restore from the mistake ...

gdh1995 avatar Oct 22 '23 16:10 gdh1995

@afilp and me @aflip are a word apart in username and so i keep getting updates from this repo. :) just saying hi and interesting project.

aflip avatar Oct 22 '23 17:10 aflip