Xiaoxing's Notes

Copy and Paste in tmux

September 05, 2019
82 words
1 minutes

tmux is wonderful and I can't live without it. But copying content from with tmux into system clipboard was always fiddly. This setup from thoughtbot use to work for me for a long time. Until it stopped working. I have done the researching work so you don't have to. Here is the solution:

bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel pbcopy

Found the solution from this issue of tmux. Nothing beats the feeling of watching a software evolve like that after more than a decade.

Read more stories about "productivity" ->