# Fix OSX tmux copy issues # Ref: https://blog.subash.com.au/vim-style-copy-paste-in-tmux/ set-option -g default-command "reattach-to-user-namespace -l ${SHELL}" bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy' # ensure clipboard on to allow mouse copy set-option -s set-clipboard on bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" bind-key -T copy-mode-vi DoubleClick1Pane send-keys -X copy-pipe-no-clear "reattach-to-user-namespace pbcopy"