Copy to clipboard from Tmux in El Capitan

terminaltmux

I am quite happy with the Terminal changes in El Capitan (see e.g. this question).

However, i can't figure out how to enable copying to system clipboard from within Tmux. For instance, now that I am able to select text within Tmux properly by mouse, how can i copy selected text to clipboard as well, in addition to Tmux's own buffer?

I have the following in my tmux.conf:

setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on

setw -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection

I tried modifying the last line to

bind-key -t vi-copy 'y' copy-selection \; copy-pipe "pbcopy"

but it didn't really work. Would be grateful for suggestions!

Thanks!

Best Answer

Actually, I just find out very simple solution how to enable copying using Cmd+C again.

In default Terminal application go to View->"Allow mouse reporting" and uncheck it. Thats it.

PS: Obviously, the new nice features like dragging split screen in tmux stop working after unchecking the mouse reporting.