How to adapt pair programming to a shared terminal environment like Cloud9?
I tend to avoid multiple students working on the same code simultaneously (Google Docs style) because it's really difficult to assess what has been done by each student or to stop one student dominating whilst the other doesn't understand what's happening. Either that or students tend to get distracted by what the other is writing.

Having said that, you could try:


One person writes code whilst the other writes comments. This forces the two to discuss both what they're doing and what they're planning to do next.


Other paired programming techniques that don't involve simultaneous access:


Allocating a 'driver' and a 'navigator' to each pair of students: the navigator isn't allowed to touch the mouse of keyboard. The driver has to follow the navigator's instructions. Students swap after a set time. 
Sabotage and share: get students to make deliberate syntax / runtime / logical errors in their code then share a link to their code in a shared document / forum. Get students to record each error they find and fix. Award points per bug fixed.