|
|
|
|
|
by quaddo
1058 days ago
|
|
I'm trying to tell from your comment as well as the others' comments whether you're running screen locally, and what benefits that brings above and beyond iTerm for local shell sessions. For anyone else using tmux locally, I'd be interested as well. Genuinely curious. I'd consider doing likewise if the reason is compelling. |
|
I run tmux in iTerm2 on macOS; tmux is my window-manager of choice for terminal applications; shells, nvim, etc. I usually have 2–10 tmux “windows” (more like tabs) with 2–4 split panes in each (more like tiled windows). I generally never detach from my local tmux session.
Most things I use and love tmux for could probably be done with iTerm2 tabs and splits, or a modern text editor and its terminal integrations.
But, I can use tmux in iTerm2 or Terminal.app or Kitty or Gnome Terminal or urxvt, on macOS or Linux or FreeBSD and it works the same everywhere. Perhaps that's a key feature; decoupling your “terminal window manager” or “terminal desktop environment” from your terminal emulator (I guess that's like the X server in this analogy).
Also, tmux feels more keyboard-native… I can do everything from the keyboard, including navigating scrollbacks, finding/selecting/copying/pasting text, etc. Again, you can probably achieve at least 90% of this using a richly-featured terminal emulator like iTerm2, but tmux does it well, and it's portable.
Also, tmux feels more Unix… it has config files that can be git-managed, it has man pages, it is scriptable from bash/anything, etc.
That easy scriptability leads to some nice integrations, like I can configure key bindings in nvim that run commands (e.g. the test I have open) in a tmux split alongside nvim. Again, that's nothing that things like VS Code can't do too with their built-in terminal emulators etc. But it's nice.
(Despite loving tmux and iTerm2, the one thing I don't like is iTerm2's native tmux integration, where it uses tmux as the “engine” but replaces the UI with OS-native windows/splits etc. It's technically impressive, but mostly negates all the reasons I run tmux inside iTerm2 in the first place)