Overview
tmux maintains a set of named paste buffers. Each buffer may be either explicitly or automatically named. Buffers can be created from copy mode or by loading content from files.Buffer Naming
Automatic Names
Automatically named buffers are given names likebuffer0001, buffer0002, etc. When the buffer-limit option is reached, the oldest automatically named buffer is deleted.
Explicit Names
Buffers can be explicitly named when created withset-buffer or load-buffer, or by renaming with set-buffer -n. Explicitly named buffers are not subject to buffer-limit and must be deleted manually with delete-buffer.
copy-mode
flag
Scroll to bottom when reaching the end in copy mode.
flag
Hide the position indicator in the top right.
flag
Begin a mouse drag (only valid if bound to a mouse key binding).
flag
Cancel copy mode and any other modes.
flag
Scroll one page up immediately after entering copy mode.
string
Copy from src-pane instead of target-pane.
string
The target pane to enter copy mode in.
Copy Mode Key Bindings
Copy mode uses one of two key tables depending on themode-keys option:
copy-modefor emacs-style bindingscopy-mode-vifor vi-style bindings
list-keys -T copy-mode or list-keys -T copy-mode-vi.
Copy Mode Commands
Commands are sent to copy mode usingsend-keys -X. Common commands include:
begin-selection: Start selecting textcancel: Exit copy modecopy-selection: Copy the current selectioncopy-selection-and-cancel: Copy selection and exitcursor-down,cursor-up,cursor-left,cursor-right: Move cursorhalfpage-down,halfpage-up: Scroll half pagehistory-top,history-bottom: Jump to top/bottom of historysearch-forward,search-backward: Search
paste-buffer
Alias:pasteb
flag
Also delete the paste buffer after pasting.
flag
Paste bracket control codes are sent before and after the buffer if the application has requested bracketed paste mode.
flag
Do not replace line feeds (LF) with carriage returns (CR) when pasting.
string
Name of the buffer to paste. If not specified, the most recently added automatically named buffer is used.
string
Separator to replace LF characters with. Default is carriage return (CR). Ignored with
-r.string
The target pane. If not specified, paste into the current pane.
Examples
list-buffers
Alias:lsb
flag
Reverse the sort order.
string
Specify the format of each line. Available format variables:
#{buffer_name}: Name of buffer#{buffer_size}: Size in bytes#{buffer_sample}: Sample of start of buffer#{buffer_created}: Time buffer was created
string
Only show buffers for which the filter is true.
string
Specify sort order:
name, size, or creation (time).Examples
set-buffer
Alias:setb
flag
Append to the buffer instead of replacing.
flag
Send the buffer to the clipboard for target-client using the xterm escape sequence.
string
Name of the buffer. If not specified, a new automatically named buffer is created.
string
Target client for sending to clipboard (with
-w).string
Rename the buffer to new-buffer-name.
string
Data to set in the buffer. If not specified and
-n is used, renames the buffer.Examples
delete-buffer
Alias:deleteb
string
Name of the buffer to delete. If not specified, deletes the most recently added automatically named buffer.
Examples
load-buffer
Alias:loadb
flag
Send the buffer to the clipboard for target-client using the xterm escape sequence.
string
Name for the buffer. If not specified, creates a new automatically named buffer.
string
Target client for sending to clipboard (with
-w).string
required
Path to the file to load. Use
- to read from stdin.Examples
save-buffer
Alias:saveb
flag
Append to the file instead of overwriting.
string
Name of the buffer to save. If not specified, uses the most recently added automatically named buffer.
string
required
Path to save to. Use
- to write to stdout.Examples
show-buffer
Alias:showb
string
Name of the buffer to show. If not specified, shows the most recently added automatically named buffer.
Examples
choose-buffer
flag
Start without the preview.
flag
Reverse the sort order.
flag
Disable any confirmation prompts.
flag
Zoom the pane.
string
Format for each item in the list.
string
Initial filter (as a format expression).
string
Format for each shortcut key.
string
Initial sort order:
creation (time), name, or size.string
Target pane.
string
After a buffer is chosen,
%% is replaced by the buffer name and the result is executed as a command. Default: paste-buffer -p -b '%%'Buffer Mode Keys
Enter: Paste selected bufferUp/Down: NavigateC-s: Searchn/N: Repeat search forward/backwardt: Toggle tagT/C-t: Tag none/allp/P: Paste selected/tagged buffersd/D: Delete selected/tagged bufferse: Open buffer in editorf: Enter filterO: Change sort orderr: Reverse sortv: Toggle previewq: Exit
Examples
clear-history
Alias:clearhist
flag
Also remove all hyperlinks.
string
The target pane.