Add command to Move current tab to tab group to the right/left/above/below

Use case or problem

I really like the functionality of switching focus between left and right tab groups, but find myself also wanting to move the current tab to the other tab group quite often. Unfortunately, there is no command to this. I suspect this would be quite easy to implement and would help people who want to stay on the keyboard as much as possible

Proposed solution

Suggestion:

  • Implement Move current tab to tab group on the right
  • Implement Move current tab to tab group on the left
16 Likes

Is this the same as ‘Move current tab to new pane’ hotkey option, or are they different? They are close, for sure.

I had a look at that, but I believe panes are different from tab groups? I am not entirely sure on the nomenclature used.

Crucially this shouldn’t be a new tab group, but one that is already open - perhaps except in the case where it is already the rightmost/leftmost tab group, which case it could create a new tab group? Similarly if moving a tab out of a tab group results in that tab group being empty, it should be closed

1 Like

Tab group is the new name for pane.

1 Like

Less important but relevant there could be move current tab to tab group below/above

I agree that these should also be implemented. Maybe people with vertical monitors will find this particularly useful

No, it’s not the same, but it’s closely related. My original request was to move the current tab to a new pane (i.e. tab group, in the new parlance), rather than moving it to a different tab group.

1 Like

For what it’s worth:

Unless I’m mistaken there’s a precedent in IDEs for moving the current tab to the existing group to the left/right/below/above, if a tab group already exists, and to create a new tab group if a tab group doesn’t exist there yet.

But I haven’t seen any implementation of “create a new tab group no matter what”.

I’m only stating this because this design is more common and is my preferred “middle way”

1 Like

Thanks. The reason I submitted my original FR was because the introduction of tab groups was (and still is) giving me all sorts of usability problems. I want to be able to guarantee opening a note in a new pane (i.e. its own new tab group), rather than having it be forced into an existing tab group. As I pointed out in the FR, we can already do this if we want to move a tab to a new window (something I would never want to do, incidentally), so why can’t we also do so in a new pane (i.e. tab group)?

1 Like

I think this feature is quite essential. VSCode even has a default keybinding:
“View: Move Editor into Next Group” ⌃⌘→

3 Likes

Did this request die? Even a plugin would be amazing!

Check out GitHub - jsrozner/obsidian-tab-shifter.

I just finished writing it. I requested it to be added to community plugins, but in the meantime you can add it manually via github or using BRAT (for beta testing)

7 Likes

Awesome, finally!

2 Likes

I just finished writing it. I requested it to be added to community plugins, but in the meantime you can add it manually via github or using BRAT (for beta testing)

And it’s in! Search for “Tab Shifter”

5 Likes

Thanks for the awesome plugin! I am wondering if it would be possible to get a similar behavior, but instead of moving a tab to the next/previous tab group, to move it within a tab group? This would be useful for people who are working with the stacked view. I think this is in line with the difference that @gruts has pointed out.

You can use GitHub - pjeby/pane-relief: Obsidian plugin for per-pane history, pane movement/navigation hotkeys, and more for that

2 Likes

I also think this feature would be extremely helpful
Here’s my suggestion that I think would be a big improvement over the existing Split right/down commands:

Use case or problem

If you want to move a tab from one pane to another existing one, this is currently only possible via drag and drop.
Split right/down always creates a new pane, so if you want to move a tab from the left to the right pane, it opens a third vertical pane instead. On top of that, the tab is duplicated instead of moved, which I don’t think makes much sense.

Proposed solution

Introduce 4 new Commands for moving a tab from one pane to another existing pane.
Example Behavior:

  1. If only one pane is open and the Move tab right Command is executed, it should open a new pane to the right, and move the tab there.
  2. When the same command is executed again, while the right panel is still focused, It creates a third vertical pane in the same manner.
  3. Having 3 vertical panes open and the focus is now switched to the middle pane, another execution of Move tab right does not create a 4th pane, but instead moves the currently active tab to the existing pane on the right
  4. The same logic should apply for the horizontal Commands: when executing Move tab down, it creates a new horizontal pane below and moves the active tab into it.

This way, 4 different Commands for all 4 directions need to be implemented, that essentially do the same thing as the Split right/down commands, but cover more use cases.
The only downside would be that a new pane is not getting created when 2 horizontal or 2 vertical panes already exist, and when you want to create a 3rd one right in between. But this can still be resolved via drag and drop. Thus, the Split right/down could also be removed.

1 Like