Table of Contents
Copy Mode
WARNING: This document is for an older version of iTerm2.
Copy Mode allows you to make selections using the keyboard. To enter or exit Copy Mode, select Edit > Copy Mode. You can also enter copy mode by pressing
While in Copy Mode, the session’s contents will not change. You can use the keyboard to move the cursor and modify the selection using these keystrokes:
Changing Modes
Keystroke | Action |
---|---|
<C-Space> | Stop selecting |
<Esc>, q, <C-c>, <C-g> | Exit copy mode |
<C-v> | Toggle rectangular selection |
<Space>, v | Toggle selection by character |
V | Toggle selection by line |
Basic Movement
Keystroke | Action |
---|---|
h, <Left> | Move left |
j, <Down> | Move down |
k, <Up> | Move up |
l, <Right> | Move right |
Content-Based Movement
Keystroke | Action |
---|---|
<M-Left>, <M-b>, <S-Tab>, b | Move back one word, treating symbols as word breaks. |
<M-Right>, <M-f>, <Tab>, w | Move forward one word, treating symbols as word breaks. |
B | Move back one word, treating symbols as part of a word. |
W | Move forward one word, treating symbols as part of a word. |
[ | Move to previous mark |
] | Move to next mark |
Screen Movement
Keystroke | Action |
---|---|
<C-b>, <PageUp> | Move up one screen |
<C-f>, <PageDown> | Move down one screen |
H | Move to top of visible area |
M | Move to middle of visible area |
L | Move to bottom of visible area |
Line Movement
Keystroke | Action |
---|---|
^, <M-m> | Move to start of indentation |
0 | Move to start of line |
$ | Move to end of line |
<Return> | Move to start of next line |
Document Movement
Keystroke | Action |
---|---|
g | Move to start |
G | Move to end |
Other Commands
Keystroke | Action |
---|---|
o | Swap cursor and other selection endpoint |
<C-k>, y | Copy selection |