Sample Header Ad - 728x90

Copy to clipboard from Tmux in El Capitan

25 votes
9 answers
25040 views
I am quite happy with the Terminal changes in El Capitan (see e.g. [this question](https://apple.stackexchange.com/questions/208384/changes-to-terminal-in-el-capitan)) . 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!
Asked by vitvly (733 rep)
Oct 1, 2015, 12:27 PM
Last activity: May 4, 2021, 06:00 PM