0

I use the C-b = command in Tmux to select a specific paste buffer from a list.

I wonder how I can use the identifiers (0),...,(9) and (M-a),...,(M-z) to directly paste specified buffer? Indeed, C-b ] paste the (0) buffer.

Furthermore, is it possible to paste a buffer using its name, e.g. "buffer69"?

enter image description here

2

The bit in brackets is the key to press, so you can paste buffer 42 by pressing C-b = M-r.

Alternatively you can use the command prompt: C-b : pasteb -b buffer42.

It is possible to bind a key to make a command prompt that just asks for the buffer name, something like:

bind B command-prompt -pbuffer 'pasteb -b "%%"'
| improve this answer | |
  • Thank you. Small errata: the bit in parentheses. Also M-z is two keys? :) – Shuzheng Jun 18 at 8:23
  • Parentheses are also called brackets. M-z is Meta and z together, usually Alt-z on modern keyboards. – Nicholas Marriott Jun 18 at 11:04
  • Sorry for off-topic, but is M-z considered a single key, just like ^-C (Control-C)? – Shuzheng Jun 18 at 11:14
  • Yes it is a single key like C-c, you press Meta and z together for M-z same as you press Ctrl and c together for C-c. – Nicholas Marriott Jun 18 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.