This document discusses tools and techniques for effective remote pairing and collaboration using tmux and vim. It recommends using tmux to create terminal sessions that allow collaborators to work together in synchronized panes. Specific tmux and vim configurations are provided to facilitate splitting terminals into panes. Pair programming techniques like driver/navigator and ping pong testing are also outlined. The overall message is that remote pairing requires tools like tmux to enable real-time collaboration as well as interpersonal skills like patience and communication.
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Pairing with tmux and vim
1. Pairing with
tmux and vim
Realtime Tools
for Remote Teams
Scott Baldwin
Chief Happiness Officer, WellMatch
@scottsbaldwin
2. We are NOT in the
same room
• Instant Messaging:
HipChat
• A/V: Skype
• Workstation: EC2
• ChatOps: lita
• Text Editor: vim
• Realtime Enabler: tmux
3. Pair Programming
• distribute knowledge
• build quality up front
• mentoring
• can be taxing
• can be awkward
• shows your vulnerabilities
• requires humility
4. Positivity + Eye Contact =
Biobehavioral synchrony
When positive emotions are shared
and two people make eye contact,
they move to the same hidden beat
and start to act as one.
5. tmux
• create and attach to terminal sessions
• sessions can keep running in the background
• don't worry about "Write failed: Broken pipe"
7. ~/.tmux.conf
# setw: set-window-option
# -g: sets the global session
setw -g mode-keys vi
bind | split-window -h
bind - split-window -v
# vim direction keys for pane switching
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# maximize a pane
unbind Up; bind Up resize-pane -Z;
unbind Down; bind Zoom resize-pane -Z;
8. vim
• terminal-based text editor
• sure, you could use emacs
• extensible with plugins to provide more
power
• try to learn a new editor trick each week
13. tmuxinator
• quickly start up all your tmux panes
• launch commands within each pane
windows:
- editor:
layout: main-vertical
panes:
- vim
- guard
- server: bundle exec rails s
- logs: tail -f log/development.log
14. How we code remotely
• provision pairing instance
• checkout a feature branch
• pair programming
• acceptance of feature
• merge to master
• tear down pairing instance
15. I <3 chatops
"data" is our ChatOps bot
bot pair me
bot pair add scottsbaldwin to quivering-cactus-4911
bot pair add <another user> to quivering-cactus-4911
bot pair stop quivering-cactus-4911
bot pair start quivering-cactus-4911
ssh scottsbaldwin@quivering-cactus-4911
sudo su devuser
tmux new -s my_session
18. The Gondola
• I am a gondolier
• team members take a ride
• tmux provides a gondola
• riders enjoy the views
19. Lessons I have Learned
• pairing is hard
• personal growth:
• patience
• listening
• communicating
• my way isn't always right
• it's kind of like marriage!