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
Scroll to bottom when reaching the end in copy mode.
Hide the position indicator in the top right.
Begin a mouse drag (only valid if bound to a mouse key binding).
Cancel copy mode and any other modes.
Scroll one page up immediately after entering copy mode.
Copy from src-pane instead of target-pane.
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
Also delete the paste buffer after pasting.
Paste bracket control codes are sent before and after the buffer if the application has requested bracketed paste mode.
Do not replace line feeds (LF) with carriage returns (CR) when pasting.
Name of the buffer to paste. If not specified, the most recently added automatically named buffer is used.
Separator to replace LF characters with. Default is carriage return (CR). Ignored with
-r.The target pane. If not specified, paste into the current pane.
Examples
list-buffers
Alias:lsb
Reverse the sort order.
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
Only show buffers for which the filter is true.
Specify sort order:
name, size, or creation (time).Examples
set-buffer
Alias:setb
Append to the buffer instead of replacing.
Send the buffer to the clipboard for target-client using the xterm escape sequence.
Name of the buffer. If not specified, a new automatically named buffer is created.
Target client for sending to clipboard (with
-w).Rename the buffer to new-buffer-name.
Data to set in the buffer. If not specified and
-n is used, renames the buffer.Examples
delete-buffer
Alias:deleteb
Name of the buffer to delete. If not specified, deletes the most recently added automatically named buffer.
Examples
load-buffer
Alias:loadb
Send the buffer to the clipboard for target-client using the xterm escape sequence.
Name for the buffer. If not specified, creates a new automatically named buffer.
Target client for sending to clipboard (with
-w).Path to the file to load. Use
- to read from stdin.Examples
save-buffer
Alias:saveb
Append to the file instead of overwriting.
Name of the buffer to save. If not specified, uses the most recently added automatically named buffer.
Path to save to. Use
- to write to stdout.Examples
show-buffer
Alias:showb
Name of the buffer to show. If not specified, shows the most recently added automatically named buffer.
Examples
choose-buffer
Start without the preview.
Reverse the sort order.
Disable any confirmation prompts.
Zoom the pane.
Format for each item in the list.
Initial filter (as a format expression).
Format for each shortcut key.
Initial sort order:
creation (time), name, or size.Target pane.
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
Also remove all hyperlinks.
The target pane.