3 ms·
I read the Control Mode section of the man page, but the utility didn't leap off the page. Would you share what's cool about this mode?
by riddley 3y ago
I read the Control Mode section of the man page, but the utility didn't leap off the page. Would you share what's cool about this mode?
- shmichael 3y agothe iterm mode allows one to create, split, resize remote terminals as of they were native terminal windows, instead of all of them being contained within one terminal window and controlled using completely different keyboard-only shortcuts (via tmux)
- singwhenurdown 3y agodoes this make it faster? or is it used for the native feel
- drbaba 3y agoMainly the native feel. For example, you can use standard Cmd-based keybindings to control tabs and panes, and get smooth mouse scrolling in each pane.
- lanza 3y agosshing into a server only happens within one shell. Thus you can open tmux there and that's the only level of granularity you can have. iterm window->iterm tab->ssh->tmux windows->tmux panes With `tmux -CC` it lets you hoist that chain upwards and map the entire ssh session into an iterm window. iterm window (ssh session) -> iterm tabs (tmux windows) The biggest benefit for me is that you can then open another tmux session within the CC one and use tmux as normal iterm window (ssh session) -> iterm tabs (tmux windows) -> tmux2 windows -> tmux2 panes And then the normal feature of tmux is that it persists across ssh sessions. This also means that the entire iTerm2 window and all its tabs and splits are also maintained across sessions. I think my current layout on my main development machine that I remote into is over 3 months old. Another point of view is that it decouples the state of your tmux tabs/panes from your terminal emulator itself. e.g. if you use this locally instead you could then terminate the entire iterm program and reopen it and restore the same exact window/tab/pane splits you previously had. This is a nice perk for restarting/updating iTerm.
- jordemort 3y ago> f you use this locally instead you could then terminate the entire iterm program and reopen it and restore the same exact window/tab/pane splits you previously had. This is a nice perk for restarting/updating iTerm. iTerm seems to be able to pull this off itself during upgrades, even without tmux. The first time it happened, I was surprised, and now I just install iTerm updates with abandon, knowing that all my 40 terminal windows and all the stuff in them will come back after the update.
- riddley 3y agoI appreciate your explanation, but I'll confess that I still don't get it. I assume I'm just not understanding; please don't take offense. The state of my splits etc are already distinct from the terminal emulator as is/are the session(s) without CC. I can restart my terminal emulator or add new sessions at will without needing any special support from the terminal.
- AceJohnny2 3y agoFirst, some background: Tmux is great but (like GNU Screen) introduces a layer of abstraction between you and the shell. You have to use its special keybindings to create new windows, switch window/pane, or most annoyingly to scroll through history. Control Mode removes that layer of abstraction, so (with iTerm) you can use all the normal terminal emulator functions to do what you expect: click on panes to select them, tmux windows are just native tabs, and you can scroll the terminal natively In effect, all the UI compromises you had to do to make use of tmux... go away. It’s a huge benefit, because it means all the friction of using tmux disappears. Instead of thinking “do i really want to deal with tmux’s UX for this quick ssh session?” (it’s never as quick as you think) I just do it. All my terminal sessions are now in tmux. If I’m doing something on a remote machine, i can confidently close my laptop and know i can restore later.