Zet - How do I use tmux copy mode?
How do I use tmux copy mode?
Answer
Enter copy mode with Prefix + [ (Ctrl+A, then [).
Once in copy mode (vi keys enabled):
| Action | Key |
|---|---|
| Start selection | v |
| Copy selection | y |
| Move cursor | h/j/k/l |
| Scroll up | Ctrl+u / Ctrl+b |
| Scroll down | Ctrl+d / Ctrl+f |
| Search forward | / |
| Search backward | ? |
| Next match | n |
| Previous match | N |
| Cancel / quit | q or Escape |
| Go to top | g |
| Go to bottom | G |
| Jump to line | : + line number + Enter |
Line numbers aren’t displayed in the gutter like vim. Use : to jump to a specific line. Your current line position can be shown in the status bar by adding #{cursor_y} to status-right — it only updates on newlines, not on page scroll, so it’s of limited use.
Example
To copy text from the terminal:
Prefix + [— enter copy mode- Navigate to the text you want
v— start highlighting- Move with
hjklto select y— yank (copies to tmux buffer)
Paste with Prefix + ].
EasyJump (vim-easymotion-style)
Prefix + g — type 2 characters, then type the label letter to jump directly to that position. Works both in normal mode and inside copy mode (Ctrl + g).
No patterns, no pre-defined matches — just jump to any text on screen.
#tmux #copy-mode #vi #easyjump