Move tab to other pane


#1

Say I have opened tabs A and B. Now I find I’d like to look at B while writing in A. So I go to B and do Cmd-K Right. This will open a pane on the right and it will show B in that pane. Very good.

However, it will also duplicate the B tab – there is now one copy of it in the left hand pane (the original one) and one copy in the right hand pane (the copy created by Cmd-K Right).

But I find that nearly always I want the original copy to be deleted – I just need one copy of the tab, and it should be in the newly created pane.

And I’d like a way to move a tab from one pane to the other.

PS: I didn’t know whether I should say “tab” or “file”.


#2

Thanks for bringing this up, this also annoyed me, but I never got around to making a solution :stuck_out_tongue: This should do the trick:

atom.commands.add 'atom-pane', 'pane:split-right', (e) ->
  paneView = e.currentTarget
  pane = paneView.getModel()
  process.nextTick ->
    pane.destroyActiveItem()

Variants for ‘split-down’, ‘split-up’ and ‘split-left’ should work exactly the same.


#3

For ease of use I created a package: pane-split-moves-tab. It adds this for all variants of the pane:split-xxx commands.


#4

I was going to suggest this when I read the post … but was on my way to a meeting :grinning: Glad to see you followed up!