My tmux setup

A look at my favourite configuration settings

February 18, 2014

I have been using tmux for a couple of years now, I committed a tmux.conf to my dotfiles repo two years ago this week. I find that it is an excellent way to organize projects, share a session for pairing, or just ensure ⌘W or ⌘Q don't ruin your day! I just wrote a post on how I use it a Iora Health to manage my development environment that includes a number of services.

Today though I just want to share the commands I use most often and how I have them bound to intuitive keys to make it easier.

Prefix (first things first)

By default the prefix in tmux is ^ b. The list-sessions command has a default key binding of prefix s. So to execute this in a tmux session you need to hit ^ b s. I dislike having to press a key combo followed by a key. Instead I use the Meta key in prefix-less key bindings. In my tmux.conf file I rebind my most used tmux commands with the -n option, e.g.:

History, Scrolling, Copy mode

Copy-mode is a way to navigate the history of a session. You can move around the screen like vim and scroll back through the history. You can also search in copy mode by hitting / or ?. To exit copy mode just to hit enter.