How can we copy and paste text in TMUX?
Check the GitHub Dotfiles
We are using the tmux-yank plugin from the previous video.
To select text:
- Press
Ctrl + bto enter TMUX command mode. - Move the cursor to the start of the text you want to select.
- Press
Spaceto start the selection. - Move the cursor to the end of the text.
- Press
yto copy the selection to the system clipboard.
Or just drag the mouse to select text and press y to copy
I still don’t use it but you can give a try
# Example key bindings (tmux-yank plugin)
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-selection-and-cancel
Now you can paste the copied text with your usual system paste shortcut.