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 copy-mode to move to the text to select. ctrl+b followed by [

2. Navigate to the thing to be selected

3. Begin the selection with space

4. Navigate to the end of the thing to be selected

5. Press enter

To paste:

1. Press ctrl+b

2. Press ]

While in copy-mode you can toggle the column or line based selection by tapping the v. 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 copy-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 tmux 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

Navigation

index

tags

Backlinks

2023-11-10 - tmux divinity and random stuff

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

generated: 2024-06-15