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 [

  1. Navigate to the thing to be selected

  1. Begin the selection with space

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

  1. Press enter

To paste:

  1. Press ctrl+b

  1. 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

created: 2023-11-07

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

(re)generated: 2025-01-29

Proxy Information
Original URL
gemini://thatit.be/2023-11-07-08-29-56.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
472.657232 milliseconds
Gemini-to-HTML Time
0.69903 milliseconds

This content has been proxied by September (3851b).