Hacker News new | ask | show | jobs
by lpilot 2249 days ago
I haven't got my config to hand, but essentially I've binded leader-y and leader-p to copy and paste respectively both using the system clipboard. Since doing that tmux has been so much more useful to me.
1 comments

I've always wanted something like that, can you please share your config?
This is the section of my config that sets up using the clipboard for tmux buffers. It won't work as is unless you're using both fish shell and Mac, but this should at least give you some good keywords to google and find documentation on how to do it for your system

#makes clipboard work

set-option -g default-command "reattach-to-user-namespace -l fish"

bind-key -T copy-mode-vi 'v' send -X begin-selection

bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"

If you’re using Mojave or later you don’t need `reattach-to-user-namespace` anymore :)