Merging different windows in tmux

my question is simple. I have two windows in tmux session, 1 and 2. How can I merge these two windows into one window split horizontally/vertically? I couldn't find an answer in manpage, so I'm asking here.


Solution 1:

I think you're looking for join-pane:

join-pane [-bdhv] [-l size | -p percentage] [-s src-pane] [-t dst-pane]
              (alias: joinp)
        Like split-window, but instead of splitting dst-pane and creating a new pane,
        split it and move src-pane into the space.  This can be used to reverse
        break-pane.  The -b option causes src-pane to be joined to left of or above
        dst-pane.

You can use this with the command-line (C-b :).