iTerm2 to attach to tmux session using tabs instead of windows?
Asked Answered
G

1

17

I got tmuxinator to work with iTerm2 the following: https://mcmap.net/q/721878/-multiple-tabs-with-tmux-tmuxinator-and-iterm2

However, each tab initially opens in a different window. Is there any way to attach to an existing tmux session using tabs rather than new windows?

There's some more info about this cool feature here: https://code.google.com/p/iterm2/wiki/TmuxIntegration

My motivation for this was: 1. copy/paste/find locks the process in tmux, whereas with iterm2, you can find in a tail of logs and not lock the process. 2. key bindings are simpler in iTerm2. 3. I like tmuxinator to start many shell windows (tabs) when doing rails web development, so that my stdout of different processes goes to different windows, rather than mixing together when using foreman.

Geodetic answered 2/11, 2013 at 22:59 Comment(0)
B
32

It is an option in iTerm2: Preferences > general Open tmux windows as native tabs in a new window, but you have to disconnect then reconnect.

iterm2-windows-as-tabs

Solution found here

Betweentimes answered 15/4, 2014 at 16:49 Comment(3)
Thanks! I forgot to update my question. That's my posting. I hope you liked it.Geodetic
For Googlers: if setting this option doesn't work, try updating tmux (e.g., I had this problem on v1.9a but it resolved itself when updating to 2.0) and then restarting iTerm2.Reefer
Thanks! the answer was still useful! The new UI has this under a tmux tab in Preferences > general > tmux > dropdown.Coligny

© 2022 - 2024 — McMap. All rights reserved.