Micron Document
copy and paste via keyboard in tmux

I use some vim key bindings, not sure how much of that is influenced here.

But the option for vim key bindings is:

set -g mode-keys vi

But here's the copy and paste ... recipe?

To copy:

1. Enter T383838copy-mode to move to the text to select. T383838ctrl+b followed by T383838[
2. Navigate to the thing to be selected
3. Begin the selection with T383838space
4. Navigate to the end of the thing to be selected
5. Press T383838enter

To paste:

1. Press T383838ctrl+b
2. Press T383838]

While in T383838copy-mode you can toggle the column or line based selection by tapping the T383838v. It toggles whether or not you have a selection and it visually updates when toggled while you do have a selection.

I had been calling T383838copy-mode scrollback mode for years, I had no idea what it was called, but while investigating how to use the tmux clipboard I found the actual name in the T383838tmux manual.

There's some fancy stuff you can do to export it to your preferred clipboard, but I think clipboard usage is enough of a mess, so I'm just going to use it from Tmux, for now, at least.

Tags: tmux, cli

Tags
Navigation
Backlinks


created: 2023-11-07

updated: 2023-11-06 16:15:20

(re)generated: 2026-07-17