My Tmux Configuration
Just like Vim, I’ve been using tmux for a while. Tmux is an awesome alternative to GNU screen: in every aspect, I prefer tmux.
I don’t remember exactly when I started using tmux.
At the same time I started learning Vim by exploring .vimrc
files out there, I felt the need to own my tmux workflow. And here I go, adjusting my key bindings so that I can easily split and resize panes without using the mouse.
Today, beside split panes and windows, tmux’s persistence feature is the central piece that allows me to maintain persistent SSH sessions to my development boxes. Every morning or night I close my laptop lid, commute, and once arrived I just have to open the laptop and everything automagically reconnects as if I never changed LAN.
Here are the main features of my opinionated tmux configuration:
- self contained, no need for additional utility scripts in
$PATH
-
C-a
acts as secondary prefix, while keeping defaultC-b
prefix - visual theme inspired by powerline
- maximize any pane to a new window with
<prefix>+
(works with tmux 1.6+) - mouse mode toggle with
<prefix>m
- automatic usage of
reattach-to-user-namespace
if available
You can find it in my GitHub repository.