Search code examples
tmux

Is it possible to paste in all tmux panes simultaneously using tmux copy & paste?


If I run tmux with synchronized panes, I can type and have the text appear in all panes at the same time.

Furthermore, if I use the mouse to select text and copy it into the system clipboard, I can paste and have it appear in all panes.

However, if I want to use tmux native copy (prefix-[) and paste (prefix-]), the pasted content appears in only one pane.

Is there a native tmux way to paste in all panes of the current window?


Solution

  • There is no native tmux way so far to achieve it. Because pasting buffer is calling paste-buffer command. It can only be applied on a single pane, with the optional -t.

    Your system clipboard approach worked because you were using the send-key (I guess) in key mapping.

    What you can try is, if you have synchronized panes, you type in one pane: tmux pasteb, you will see that this command was typed in all panes, however the result/output comes only to your current pane.