tmux 2 Productive Mouse-Free Development

tmux 2 Productive Mouse-Free Development

看 missing 课程的时候再次翻到这里,在 goodreads 上看到居然出了第二版。2016 年出版的,新版本需要 tmux 2.3 以上,抽空翻翻。

  • Outline
    • Acknowledgments
    • Preface
      • What is tmux
      • Who Should Read This Book
      • What’s in This Book
      • Changes in the Second Edition
        • tmux verion > 2.3
      • What You Need
      • Conventions
      • Online Resources
    • 1 Learning the basics
      • Installing tmux
      • Starting tmux
      • The command prefix
      • Detaching and attaching sessions
        • Sessions - a session is an independent workspace with one or more windows
          tmux [[starts]] a new session.
          tmux new-session -s NAME [[starts]] it with that name.
          tmux new -s NAME [[starts]] it with that name.
          tmux new -s NAME -d # create new session background
          
          tmux list-sessions
          tmux ls [[lists]] the current sessions
          
          tmux attach -t NAME [[attaches]] the last session. You can use -t flag to specify which
          tmux a
          
          tmux kill-session -t NAME
          
          prefix ( # prefix session
          prefix ) # next session
          prefix s # display a list of sessions
          prefix . # move window to session
          
          <prefix>:move-pane -t <session_name>:<window number>
          
      • Working with windows
        • Windows - Equivalent to tabs in editors or browsers, they are visually separate parts of the same session
          prefix c # Creates a new window. To close it you can just terminate the shells doing <C-d>
          prefix N # Go to the *N* th window. Note they are numbered
          prefix p # Goes to the previous window
          prefix n # Goes to the next window
          prefix , # Rename the current window
          prefix w # display a visual menu of windows, include all session
          prefix & # close window
          prefix f # find window
          
          swap-window -s 1 -t 2 # reorder windows
          
      • Working with panes
        • Panes - Like vim splits, panes let you have multiple shells in the same visual display.
          prefix " # Split the current pane horizontally
          prefix % # Split the current pane vertically
          prefix <direction> # Move to the pane in the specified *direction*. Direction here means arrow keys.
          prefix z # Toggle zoom for the current pane
          prefix [ # tart scrollback. You can then press prefix<space>prefix to start a selection and prefix<enter>prefix to copy that selection.
          prefix <space> [[Cycle]] through pane arrangements.
          prefix x # closing pane
          
      • Working with command mode
      • What’s next
      • For future reference
    • 2 Configuring tmux
      • Introducing the .tmux.conf File
    • 3 Scripting Customized tmux Environments
      • Creating a Custom Setup with tmux Commands
      • Using tmux Configuration for Setup
      • Managing Configuration with tmuxinator
    • 4 Working with text and buffers
      • Scrolling Through Output with Copy Mode
      • Copying and Pasting Text
    • 5 Pair programming with tmux
      • Pairing with a Shared Account
      • Using a Shared Account and Grouped Sessions
        • ​tmux​ new-session -t groupedsession -s mysession
      • Quickly Pairing with tmate
      • Pairing with Separate Accounts and Sockets
    • 6 Workflows
      • Working Effectively with Panes and Windows
      • Managing Sessions
    • A1 Our configuration
  • Related
    • [[tmux: Productive Mouse-Free Development]]