Inspired from the great article http://denkinger.us/article/remote-pair-programming-with-tmux-vim, this HOWTO describes how to remotely run vim with two (or more) people operating and watching. This doesn’t just work for vim, but for ANY remote work session.
- tmux is already installed on your beckbox! You can also use http://www.gnu.org/software/screen/, also already installed on your beckbox! The steps for screen are outlined here (note, I’ve always had to tweak pty permissions with screen, and that’s not really needed with a tmp-owned socket as described below.)
- One person starts up a tmux session like so to create a socket in /tmp/remotepair:
tmux -S /tmp/remotepair
- The second (and subsequent) person starts up their tmux session and attaches to the existing socket:
tmux -S /tmp/remotepair attach
Et viola! That was easy. Now just fire up your vim session and go. Note that because the person who started the tmux session is really the user in the eyes of Linux, that user’s regular environment and home directory are the ones that will be used to provide .vimrc.