One of the really neat things that you can use tmux for is pair programing. You can see right here I have two terminal windows open. They're both SSH into the same server.
I'm using a simple DigitalOcean Droplet. You can of course set up SSH with your pair programmer however you want, whether that's with another server or with one of your laptops, whichever works best for you.
The neat thing here is that in one of these windows, we can type tmux new session -s pair, and it'll launch a tmux session. So far, so good. This is a pretty ordinary thing to do.
If I go into the other window, I can run tmux ls, and I can see that there is a tmux session here, which I can also attach to. I'm going to type tmux a, which is a shortcut for attach, -t pair.
Now both of these windows, they are separate SSH sessions, and they are attached to the same tmux session. Commands, the pane setup, all of that stuff will be reflected in both. For example, I can do a pane split with Ctrl-b+%, and we see that both sessions reflect the split.
Let's go back down to one pane. I'm going to do Ctrl-d to close that extra one. Let's go into vim.
This is where it starts to get really cool for pair programing. I can do the quick brown fox jumped over the lazy dog. Obviously, you're going to be wanting to write something a little bit more substantial.
The cool thing here is that this happens with barely any lag, and not only do you get to see my code update live, you also get to follow my cursor. You can see how I'm navigating and all of that.
Again, this doesn't require any fancy configurations or changes to how you use tmux. You both just have to be sharing the same session.