After watching several advanced developers use the tmux terminal multiplexor, I grew curious. The time came for me to find out what all the fuss was about. Brian Hogan’s tmux: Productive Mouse-Free Development served (and continues to serve) as my guide.
The book does not assume any prior knowledge of tmux. Readers should have at least a passing familiarity with Vim or Emacs. Knowing a little about one of the modal editors will help you to grok tmux all the better. Hogan starts off by telling readers what they can expect to achieve once they’ve achieved proficiency with tmux. The author has also prepared a video showing how he uses tmux in his daily workflow.
I am a tmux rookie, and by the end of chapter one I was able to install and use the tool for basic tasks.
“tmux, by default, doesn’t have the most friendly commands.” So begins chapter two of the tmux book. From this point Hogan shows the reader how to configure the tool for productive use. I could have used more screenshots in this chapter. For example, in the “Defining an Easier Prefix” section, Hogan tells the reader how to tell tmux to re-read its configuration file after changes have been made. A screen shot would make it clear that the command sequence should appear on tmux’s command line, not at the command line within the shell. I spent a few minutes banging my head against my palm before I figured that one out.
Chapter two shows the user how to create a .tmux.conf file which, if the user chooses to include comments, can serve as a quick-reference guide after the book is done. Vim users will appreciate the key bindings recommended by the book: h, j, k, and l forever! By the end of the chapter, you can move between panes without moving your hands off the home row of the keyboard.
Some readers may hollar “heresy!” when Hogan recommends re-mapping the the CAPS LOCK key to Ctrl. There are stories of pair-programming teams who fight when one member re-maps caps lock without consulting the other. Hogan gives a good reason for re-mapping: It keeps the developer’s fingers on the home row, and tmux is all about maximum productivity with minimum movement.
Each chapter ends with a “For Future Reference” block which contains the commands learned in that chapter. Useful for (let me see now…) future reference.
If you want to gain an understanding of tmux in the space of a weekend, Hogan’s tmux book is a great place to start. The book is short, well written, and tailored for developers who want to get things done.