Table of Contents Getting Started with tmux Credits About the Author Acknowledgments About the Reviewers www.PacktPub.com Support files, eBooks, discount offers, and more Why subscribe? Free access for Packt account holders Preface What you need for this book Who this book is for Conventions Reader feedback Customer support Errata Piracy Questions 1. Jump Right In Running tmux Sessions Naming the session The window string Creating another window The prefix key Help on key bindings Searching for text Detaching and attaching Explaining tmux commands Tab completion Aliases Renaming windows Killing windows Summary 2. Configuring tmux Using the set-option command Creating a tmux configuration file Emacs or vi mode Enabling mouse modes Changing the status bar Modifying the background color of the status bar Reloading the configuration Changing the foreground color of the status bar Highlighting the active window Binding keys Viewing current bindings Chaining multiple commands to a single key Comments in the configuration file Binding a new prefix key Binding keys without the prefix key Unbinding keys Status bar revisited Option types Handy configuration tips Binding the double tapping of the prefix key to last-window Changing the escape time Lengthening the history limit Lengthening the display time Starting the base index at 1 Accessing the man page Show options Summary 3. Sessions, Windows, and Panes Overviews Sessions Windows Panes Playing around with sessions, windows, and panes Multiple sessions Multiple panes Working with more panes Zooming panes Resizing panes Switching between panes by number Cycling through pane layouts Other pane operations Summary 4. Manipulating Text Explaining the Window history Explaining the different tmux modes A sample workflow with Copy mode workflow Entering Copy mode Moving the cursor around Scrolling through the Window history Jump by search or line Leaving Copy mode Copying text into the paste buffer Interacting with the paste buffer Pasting text from the paste buffer Choosing items from the paste buffer Working with the paste buffer Summary 5. Diving Deeper Understanding tmux commands and Command mode Advanced paste buffer usage Saving a paste buffer to a file Loading a paste buffer from a file Setting a paste buffer directly Capturing pane contents in a paste buffer Deleting copied text from a paste buffer Clearing the paste buffer history An advanced session and window usage Jumping from one window in a session to another window in another session Moving windows Linking a window between sessions Breaking panes Joining panes Launching with defaults Summary 6. tmux for SSH, Pair Programming, and More Using tmux over SSH for long lived sessions Benefits of using Vagrant Creating a virtual machine with Vagrant Walking through a sample workflow with tmux over SSH Launching tmux on SSH connect automatically Using tmux for pair programming Connecting to the same session locally Vagrant Cloud for better security pair programming Using grouped sessions for pairing Summary 7. Using Other Tools with tmux Using tmux with the OS X Pasteboard tmux configuration from the maximum-awesome project, by Square Using tmuxinator to make session management easier Installing tmuxinator Understanding the tmuxinator configuration Revisiting the commented lines Summarizing tmuxinator Using wemux to ease multiuser experience Explaining the wemux modes Explaining other wemux additions to tmux Listing other tools to be used with tmux Summary A. Appendix Why tmux? The configuration reference Key binding and command reference Chapter 1 – Jump Right In Chapter 2 – Configuring tmux Chapter 3 – Sessions, Windows, and Panes Chapter 4 – Manipulating Text Chapter 5 – Diving Deeper Index Getting Started with tmux Getting Started with tmux Copyright © 2014 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: September 2014 Production reference: 1170914 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78398-516-6 www.packtpub.com Credits Author Victor Quinn, J.D. Reviewers Anders Damsgaard Azat Khuzhin Jason Lotito Thomas Ferris Nicolaisen Gustavo Sampaio Ian Yang (Bang Yongbae) Commissioning Editor Kartikey Pandey Acquisition Editor Harsha Bharwani Content Development Editor Akshay Nair Technical Editor Aman Preet Singh Copy Editors Roshni Banerjee Gladson Monteiro Stuti Srivastava Project Coordinator Swati Kumari Proofreaders Ting Baker Ameesha Green Indexer Tejal Soni Graphics Abhinash Sahu Production Coordinator Aparna Bhagat Cover Work Aparna Bhagat About the Author Victor Quinn, J.D., is a technology leader, programmer, and systems architect whose area of expertise is leading teams to build APIs and backend systems. Currently, he is building the API and backend system for SocialRadar, which is a startup that builds mobile apps that provide real-time information on people around you. Prior to joining SocialRadar, Victor led a rewriting of the financial processing online forms and APIs for NGP VAN, which is a company that processed billions of dollars in campaign contributions during the election year of 2012. The system he orchestrated is on track to process even more contributions in the coming election years. He led his team to build a system that included auto-filling and a sign-on system, enabling future contributions with a single click. All of these features were rolled up in a JavaScript single page app, making a fully functional payment processing form embeddable into even a static web page with a single tag. He has spent many years honing his skills with command-line tools such as tmux in order to be maximally efficient in his work. His editor of choice is Emacs and he uses the Dvorak keyboard layout. He has Bachelor of Science degrees in Physics and Computer Science from the University of Massachusetts Amherst and a Juris Doctor with focus on Intellectual Property Law from Western New England University. He is an Eagle Scout and a registered patent agent. He lives in the Washington, D.C., metro area with his wife and Great Dane and enjoys brewing his own beer and riding his Harley.
Description: