Vimium: Join tab to window

Created on 23 Jan 2017  路  12Comments  路  Source: philc/vimium

W allows us to move a tab to a new window. Is there a key combination where I can do the reverse? That is, can I join a tab to another open window?

There's a Chrome extension called Tab Glue that does it, however, I was hoping this might be possible with vimium.

Most helpful comment

In my customized Vimium (named "Vimium C"), there's a command of "moveTabToNextWindow", and it moves the current tab window by window - a little naive, but at least works. If you like you may have a try.

All 12 comments

There's no such command currently.

Would we need a way to name and/or number windows before adding such a command? I suppose vimium could probably map window ID to an index consistently. So something like moveTabToWindow? At that point, we would also need a goToWindow to be able to effectively manage tabs and windows together.

I'd like this as well - I tend to grow a large number of tabs and occasionally would like to organize them into collections based on tab type (ie: documents/articles I'd like to read) or task (investigating foo, planning vacation). As it stands, it is often too much to eagerly create new windows when starting a new task but once you have 5 tabs open for a task, it's inconvenient to create a new window and move the tabs over too.

Would goToWindow and moveTabToWindow that operate with window "indices" (and current tab for the move) sound like OK commands to implement?

I tried working on this and experimented a bit with organizing tabs between windows. The main question is indeed how to identify and target windows once you have more than two. It was somewhat convenient to move tabs between two windows with just two commands: moveTabToFirstWindow and moveTabToLastWindow.

But once you move past 2 windows the UX becomes trickier. I think there are basically two options:

  1. Display list of target windows on Vomnibar
  2. Rather than targetting windows directly, allow moving tabs to "next" and "previous" window

For (1) it is also not clear how to identify the windows even on Vomnibar. By the title of the currently selected tab? By listing all tabs, that is "moveTabToWindowThatHasTheTabYouSelectOnVomnibar"?

For (2) I'm not sure how to handle moving a count of tabs. You wouldn't want to have to keep typing the count (of tabs - although arguably maybe the count should then refer to number of windows back/forward to move a single tab?) when rotating them through windows. Wouldn't want to keep typing 3wn, 3wn, 3wn etc to move 3 tabs through a few windows.

Or maybe:

  1. yankTabToMove and moveYankedTabsHere

This is what I'm currently trying:

https://github.com/philc/vimium/compare/master...windo:moveToWindow?expand=1

yT to yank some tabs for moving and then p in a new window to move them.

Also R to move some tabs to the last tab move target window used, useful for "repeating" the last tab move for more tabs. Not so sure about this one yet but some sort of single command variant would be helpful when reorganizing many tabs and windows.

Great enthusiasm, @windo, but slow up a bit.

Of your ideas above, I like 2 the best.

To me, it's an open question whether we need a whole new command for this. This feature is asked for occasionally, but not a whole lot.

Might there not be a way to implement it as a command option on the moveTabLeft/Right or moveTabToNewWindow? We already have a few commands whose behaviour can be tweaked via options, https://github.com/philc/vimium/wiki/Tips-and-Tricks#custom-key-mappings-with-a-count.

moveTabToNewWindow (currently) always creates a new window and lacks a direction option - it sounds confusing to add direction=left/right and new_window=false options to it.

For moveTabLeft/Right is your proposal to add a 'move_window=true' option to them that rather than moving the tab left in a window would move it to the previous (by some standard) window? That sounds needlessly confusing to me as well.

So I think we need at the very least a new moveTabToWindow command of some sort.

As for the UX, I'll try out different options for a while to see how they work out for my use cases and report back. Will be sure to experiment with (2) as well since that's the one you prefer.

Thoughts on one of these workflows?

Append tab to target window:

  1. pressing a new shortcut to moveTabToTargetWindow
  2. pop up the Vomnibar tab selection window listing the active tab of each window in a format similar to Vomnibar.activateTabSelection
  3. select a window to append the current tab to

Move tab next to target tab:

  1. pressing a new shortcut to moveTabAfterTargetTab/moveTabBeforeTargetTab
  2. pop up the Vomnibar tab selection window similar to Vomnibar.activateTabSelection
  3. select a tab to move the current tab next to

I'm very interesting in seeing any way to move tabs between windows implemented!

In my customized Vimium (named "Vimium C"), there's a command of "moveTabToNextWindow", and it moves the current tab window by window - a little naive, but at least works. If you like you may have a try.

If this was available in vimium I'd use it! Is a merge to this repo possible?

Hoping this gets implemented sometime, but in the meantime I'll be trying out this chrome extension Tabbo I just found that looks promising.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

finalfantasia picture finalfantasia  路  3Comments

PickRelated picture PickRelated  路  4Comments

Semro picture Semro  路  3Comments

everyonesdesign picture everyonesdesign  路  3Comments

vbaruh picture vbaruh  路  4Comments