tmux Help

Select excerpts from man, windows & panes using vi-mode and my tmux.conf file

Tmux Cheat Sheet
Table of Contents
  1. tmux Configuration
  2. Commands
  3. Windows & Panes
tmux Configuration

Following commands are derived from my tmux.conf. bind-key is mapped as Ctrl+Shift+Z

  1. Create pane
  2. Pane switching
  3. Resize Pane
  4. Window switching
  5. Copy & Paste

Create pane

Ctrl+Shift+Z vSplit Window Vertically
Ctrl+Shift+Z hSplit Window Horizontally

Pane switching

Ctrl+Shift+Z h or Alt+h or Alt+LeftFocus on pane left
Ctrl+Shift+Z j or Alt+j or Alt+DownFocus on pane below
Ctrl+Shift+Z k or Alt+k or Alt+UpFocus on pane above
Ctrl+Shift+Z l or Alt+l or Alt+RightFocus on pane right

Resize Pane

Ctrl+Shift+Z JDecrease Pane 5 lines
Ctrl+Shift+Z KIncrease Pane 5 lines
Ctrl+Shift+Z HDecrease Pane 5 columns
Ctrl+Shift+Z LIncrease Pane 5 columns

Window switching

Shift+RightNext Window
Shift+LeftPrevious Window

Copy & Paste

Initiate block copy mode with Ctrl+Shift+Z [
Use arrow keys to move around the shell window to perform the following.

Ctr+Shift+Z vbegin selection, enter visual mode
Ctr+Shift+Z yyank (copy) selection to buffer

After yanking the selection to the buffer and returning to the command prompt can copy from tmux buffer to system clipboard

Ctr+Shift+Z ycopy from buffer to clipboard
Shift+Insertcopy from clipboard to command line
Commands
C-bSend the prefix key (C-b) through to the application.
C-oRotate the panes in the current window forwards.
C-zSuspend the tmux client.
!Break the current pane out of the window.
"Split the current pane into two, top and bottom.
#List all paste buffers.
$Rename the current session.
%Split the current pane into two, left and right.
&Kill the current window.
'Prompt for a window index to select.
,Rename the current window.
-Delete the most recently copied buffer of text.
.Prompt for an index to move the current window.
0 to 9Select windows 0 to 9.
:Enter the tmux command prompt.
;Move to the previously active pane.
=Choose which buffer to paste interactively from a list.
?List all key bindings.
DChoose a client to detach.
[Enter copy mode to copy text or view the history.
]Paste the most recently copied buffer of text.
cCreate a new window.
dDetach the current client.
fPrompt to search for text in open windows.
iDisplay some information about the current window.
lMove to the previously selected window.
nChange to the next window.
oSelect the next pane in the current window.
pChange to the previous window.
qBriefly display pane indexes.
rForce redraw of the attached client.
sSelect a new session for the attached client interactively.
LSwitch the attached client back to the last session.
tShow the time.
wChoose the current window interactively.
xKill the current pane.
{Swap the current pane with the previous pane.
}Swap the current pane with the next pane.
~Show previous messages from tmux, if any.
Page UpEnter copy mode and scroll one page up.
Up, Down, Left, RightChange to the pane above, below, to the left, or to the right of the current pane.
M-1 to M-5Arrange panes in one of the five preset layouts: even-horizontal, even-vertical, main-horizontal, main-vertical, or tiled.
M-nMove to the next window with a bell or activity marker.
M-oRotate the panes in the current window backwards.
M-pMove to the previous window with a bell or activity marker.
C-Up, C-Down, C-Left, C-RightResize the current pane in steps of one cell.
M-Up, M-Down, M-Left, M-RightResize the current pane in steps of five cells.
Windows & Panes
^Back to indentation
GBottom of history
EscapeClear selection
EnterCopy selection
jCursor down
hCursor left
lCursor right
LCursor to bottom line
MCursor to middle line
HCursor to top line
kCursor up
dDelete entire line
DDelete/Copy to end of line
$End of line
:Go to line
C-dHalf page down
C-uHalf page up
fJump forward
tJump to forward
FJump backward
TJump to backward
;Jump again
,Jump again in reverse
C-fNext page
WNext space
ENext space, end of word
wNext word
eNext word end
pPaste buffer
C-bPrevious page
bPrevious word
BPrevious space
qQuit mode
vRectangle toggle
C-Down or C-eScroll down
C-Up or C-yScroll up
nSearch again
NSearch again in reverse
?Search backward
/Search forward
0Start of line
SpaceStart selection
gTop of history

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.