Conventions
, , , |
Up, Down, Left, Right |
, , |
Alt, Ctrl, Shift |
a, b, c, <key> |
a, b, and c keys, etc. |
[Home], [Insert], [<Key>] |
Home, Insert keys, etc. |
{L} {R} |
Click left key of mouse Click right key of mouse |
, |
Additionl infomration in note area |
Help
|
List all key bindings |
: |
Start command prompt |
Default <prefix>: + b
Prefix key table
Following sheets show shortcuts and commands under key table of default prefix.
set-option -g prefix "C-b"
set-option -g prefix2 "<your prefix>"
|
Buffer
|
List the global buffers
|
|
Delete the most recently added buffer
|
|
Start buffer mode(as a pane) for choosing one
|
|
Insert the content of current buffer
|
Pane
|
Kill pane |
|
Focus at Last one |
|
Focus at Next one |
, , , :select-pane -U
/ -D
/ -L
/ -R
|
Focus at Up, Down, Left, Right one |
|
Move this pane to new window |
|
Swap position with previous pane |
|
Swap position with next pane |
+ 1:select-layout even-horizontal
|
Spread out evenly(from left to right) |
+ 2:select-layout even-vertical
|
Spread out evenly(from top to bottom) |
+ 3:select-layout main-horizontal
|
1. Large pane is on the top 2. Rest panes are spread on bottom(from left to right) |
+ 4:select-layout main-vertical
|
1. Large pane is on the left 2. Rest panes are spread on right(from top to bottom) |
+ 5:select-layout tiled
|
Spread out as evenly as possible(rows and columns) |
|
Display indicators(as number) of panes |
m:select-pane -m M:select-pane -M
|
Mark pane
Clear mark of pane |
+ , , , :resize-pane -U/-D/-L/-R 5
|
Resize pane by 5 lines Up, Down, Left, Right |
+ , , , :resize-pane -U/-D/-L/-R
|
Resize pane by 1 lines Up, Down, Left, Right |
|
Resize pane to Maximum/Normal size |
Window
|
Kill window |
|
Rename window(prompt) |
|
Move window(prompt) |
[0-9]:select-window -t :=<N>
|
|
|
Select <N>
window(prompt) |
l:last-window p:previous-window
|
Select last window
Select previous window |
|
Search for the fnmatch(3) pattern in window names, titles, and visible content |
|
Split window vertically |
|
Split window horizontally |
|
Rotate panes in window |
Client
|
Detach client |
|
Refresh current client |
|
Suspend client |
i:display-message -:show-messages
|
Display info of current pane
Show client messages |
|
Switch the current session for client to Last one |
|
Switch the current session for client to Previous one |
|
Switch the current session for client to Next one |
t ":clock-mode" |
Display a large clock |
Session
$:rename-session
(prompt) |
Rename session |
:choose-buffer
[Up], [Down] |
Select previous/next buffer |
[Enter] |
Choose selected buffer |
+ s |
Search by name |
n |
Repeat last search |
t |
Toggle if buffer is tagged |
+ t |
Tag all buffers |
T |
Tag no buffers |
d, D |
Delete selected/tagged buffers |
f |
Enter a format to filter items |
O |
Change sort order |
v |
Toggle preview |
q |
Exit mode |
:choose-client
[Up], [Down] |
Select previous/next client |
[Enter] |
Choose selected client |
v |
Toggle preview |
+ s |
Search by name |
n |
Repeat last search |
t |
Toggle if client is tagged |
+ t |
Tag all clients |
T |
Tag no clients |
d, D |
Detach selected/tagged clients |
x, X |
Detach and HUP selected/tagged client |
z, Z |
Suspend selected/tagged clients |
f |
Enter a format to filter items |
O |
Change sort order |
q |
Exit mode |
:choose-tree
[Up], [Down] |
Select previous/next item |
[<], [>] |
Scroll list of previews left/right |
[Enter] |
Choose selected item |
+ s |
Search by name |
n |
Repeat last search |
t |
Toggle if item is tagged |
+ t |
Tag all items |
T |
Tag no items |
: |
Run a command for each tagged item |
f |
Enter a format to filter items |
O |
Change sort order |
v |
Toggle preview |
q |
Exit mode |
|
|
Copy Mode
[ |
Start copy mode |
[PageUp] |
Start copy mode and scroll one page up |
q + c |
Quit copy mode |
Vi Copy Mode
Following sheets show keys in Vi edit mode
set-window-option mode-keys vi
|
<N> - As key 0-9 for times of repeating the shortcuts
E.g.: "5j"
- Move the cursor for left by 5 times
<ch> - Any printable character
<word>
- Continuous characters of [_0-9a-zA-Z]
<WORD>
- Continuous non-blank characters
#line - As integer value for line number. E.g.: "13"
Copy/Selection
[Space] |
Begin selection |
v, V |
Rectangle/Line-wise selection |
o |
Switch other end in selected area |
[Enter] + j |
Copy selection |
A |
Append selection to copied buffer |
D |
Copy to end of line(from current position) |
[Esc] |
Clear selection |
- Will quit the copy mode after the action
Search
/, ? |
Start Search <text> forward/backward |
n, N |
<N> Search next/reverse |
Cursor
k, j, h, l , , , + h [Backspace]
|
<N> Move cursor for: Up, Down, Left, Right
Left
|
^ 0 $
|
Move cursor to(current line): First non-blank char First char Last char |
f<ch>, t<ch> F<ch>, T<ch>
|
<N> Move cursor to(current line): Next <ch>/<ch> Previous <ch>/<ch> |
;, ,
|
<N> Repeat the latest "f/t<ch>"
in same/opposite direction |
w, W e, E b, B {, }
|
<N> Move cursor to: Next beginning of <word>/<WORD> Next end of <word>/<WORD> Previous beginning of <word>/<WORD> Previous/Next paragraph
|
H M L
|
<N> Move cursor to(current screen): Top(Head) Middle Bottom(Low) |
Screen Scroll
+ b, + f [PageUp], [PageDown] |
<N> Page Up/Down |
+ d, + u + , + |
<N> Half Page Up/Down |
+ y + + e + |
<N> One line Up
<N> One line Down |
: #line |
Goto "#line" line |
g G |
Top of history Bottom of history |
Emacs Copy Mode
Following sheets show keys in Emacs edit mode
set-window-option mode-keys emacs
Cancel mode: [Esc] |
<N> - As key " + 0-9" for times of repeating the shortcuts
E.g.: "+5 +b"
- Move the cursor for left by 5 times
<ch> - Any printable character
#line - As integer value for line number. E.g.: "13"
Copy/Selection
+ [Space] |
Begin selection |
+ w + w |
Copy selection |
+ k |
Copy to end of line(from current position) |
+ g |
Clear selection |
- Will quit the copy mode after the action
Search
+ r, + s |
Start Search <text> backward/forward |
R |
Rectangle selection |
n, N |
<N> Search next/reverse |
Cursor
+ p, + n , + b, + f ,
|
<N> Move cursor for: Up, Down
Left, Right |
+ m + a [Home] + e [End]
|
Move cursor to(current line): First non-blank char First char
Last char |
f<ch>, t<ch> F<ch>, T<ch>
|
<N> Move cursor to(current line): Next <ch>/<ch> Previous <ch>/<ch> |
;, ,
|
<N> Repeat the latest "f/t<ch>"
in same/opposite direction |
+ f + b + {, + }
|
<N> Move cursor to: Next end of <word> Previous <word> Next/Previous paragraph
|
+ R, + r
|
<N> Move cursor to(current screen): Top/Middle |
Screen Scroll
[PageUp] + v [Space] [PageDown] + v |
<N> Page up
<N> Page down |
+ , + |
<N> Half Page Up/Down |
+ , + |
<N> One line Up/Down |
g #line |
Goto "#line" line |
+ < + > |
Top of history Bottom of history |
Target pane
<session>:<window>.<pane>
|
Full name |
Specical token: ! ({last}) + ({next}) - ({previous}) |
Last pane Next window Previous window
|
Offset +<N>, -<N> |
Next/Previous offsets of pane
|
tokens(relative position): {up-of} {down-of} {left-of} {right-of} |
Above Below to the Left to the Right of the current pane
|
tokens(absolute position): {top} {bottom} {left} {right} {top-left} {top-right} {bottom-left} {bottom-right} |
The top The bottom The leftmost The rightmost The top-left The top-right The bottom-left The bottom-right pane
|
Target window
|
Full name |
1. As a specical token: ^ ({start}) $ ({end}) ! ({last}) + ({next}) - ({previous}) |
Lowest-Numbered window Highest-Numbered window Last window Next window Previous window
|
2. A window index |
"session1:0", "session1:1" |
3. A Window ID(prefixed with @) |
"@1", "@2" |
4. An exact window name |
"session2:help", "session2:devs-1" |
5. The start of a window name |
"session3:he", "session3:devs" |
6. As an fnmatch(3) pattern for matching the window name |
"session4:he*", "session4:devs-?" |
|
List windows |
".:<target-window>", ":<target-window>", "<target-window>" uses current session
Target session
1. A session ID(prefixed with $) |
"$0", "$1", "$2" |
2. An exact name |
"Work", "Monitor-S1", "Monitor-S2" |
3. The start of session name |
"Wo", "Monitor" |
4. An fnmatch(3) pattern for matching session name |
"Monitor*", "Monitor-S?" |
Exact matching by prefixed with =
|
"=Work", "=Monitor-S2" |
|
List all sessions |
:has-session -t <target-session>
( has
) |
Checks if a session is existing |
Target client
Name is normally as pty(7) file |
"/dev/pty0", "/dev/pts/1" |
|
List clients |
|