The Computer Oracle

Move pane to a new window in tmux

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Breezy Bay

--

Chapters
00:00 Move Pane To A New Window In Tmux
00:23 Accepted Answer Score 228
01:05 Answer 2 Score 219
01:19 Answer 3 Score 15
01:37 Answer 4 Score 12
01:53 Thank you

--

Full question
https://superuser.com/questions/600286/m...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#tmux

#avk47



ACCEPTED ANSWER

Score 228


Relevant tmux Commands

  • join-pane -s
  • join-pane -t
  • break-pane

Bindings

You could add the following bindings to your ~/.tmux.conf:

## Join windows: <prefix> s, <prefix> j
bind-key j command-prompt -p "join pane from:"  "join-pane -s '%%'"
bind-key s command-prompt -p "send pane to:"  "join-pane -t '%%'"

The above can move panes between existing windows.

For breaking a pane to a new window, use break-pane (which can also be bound).

Alterative Use

All three commands can be used from the tmux's prompt like: <prefix>+: then break-pane
Or at the shell's prompt (inside tmux) with: tmux break-pane.




ANSWER 2

Score 219


From the commands list, you can see that it's called break-pane and the command is just

bind-key !

where bind-key is defaulted to Ctrl+B




ANSWER 3

Score 15


In the latest version of tmux, installed from homebrew on OSx - 1.9a - the default key-binding implements join-pane with a menu

bind-key          S choose-window "join-pane -v -s "%%""
bind-key          V choose-window "join-pane -h -s "%%""



ANSWER 4

Score 12


tmux 1.8 or above:

If you are intending to go to a "fullscreen" mode, you can use:

bind-keyz

to "zoom in" (and also zoom-out after you finished your work).