Remote pairing with GNU Screen and Vim

8th January 2010

All the recent #uksnow has left the Eden studio a little deserted. With several of us having longish drives in to the office, we’ve been forced to get much better at remote pairing.

In the past we’ve used iChat screen sharing in the office for pairing on laptops, but with two people both at the end of a DSL connection, the screen + voice bandwidth demands are pretty high, and the guest user is at a painful disadvantage.

Vim is currently undergoing something of a rennaisance at Eden Development. Several of us have been trying to use it for all our coding. Fortunately this has stood us in good stead to take advantage of a great low bandwidth pair programming solution.

GNU Screen + vim (+ skype).

John Haruska gives a great overview of different remote pairing solution and outlines how to use screen to set up a shared terminal. Unfortunately we weren’t able to use the acl method to allow different UNIX users to share a ‘screen’ on our macs, but if both users logged in to the same unix account it worked like a dream.

Our basic process is:

User 1 sets up a screen as a shared user on the host machine

pairing$ screen -S pairing
Ctrl-a :multiuser on

User 2, logs into the maching via ssh, and connects to the shared screen

local$ ssh pairing@shared_machine
pairing$ screen -x pairing

That’s basically it. Both users then have access to a full shared terminal environment. A shared screen can have multiple windows, so we tend to work with one screen for vim and another for running tests and other terminal commands. We also make extensive use of vim tabs and shell execution from within vim.

A couple of tips:

aimee has a great description of how aimee, Enrique and I ended up trio-programming over the last couple of days, and here’s a photo to prove it. I’m the remote on the macbook to aimee’s left.

trio-programming

blog comments powered by Disqus