small medium large xlarge

Back to: All Forums  tmux 2
11 May 2017, 13:36
Matthew Rankin (2 posts)

Since the copy-mode shortcut changes in tmux 2.4 are incompatible with 2.3, do you have a new recommendation for getting the OS X clipboard to work? I’ve seen a few different recommendations, but I haven’t researched enough to determine the advantages/disadvantages of the different solutions and would greatly appreciate your input.

11 May 2017, 14:34
Brian P. Hogan (159 posts)

Hey, thanks for reading!

Here’s what I’m currently testing:

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

I plan to update the book to have this issue addressed once I decide this is the way to go.

12 May 2017, 13:58
Matthew Rankin (2 posts)

Currently, I’m using 1ambda’s recommendation found in tmux issue #592 shown below. Have you looked into tmux-yank? I haven’t used any tmux plugins yet, and would be curious as to your thoughts on that.

Thanks for such a great book—both the first and second editions.

bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -Tcopy-mode-vi Escape send -X cancel
bind-key -Tcopy-mode-vi V send -X rectangle-toggle
30 Jun 2017, 00:03
Brian P. Hogan (159 posts)

I’ve not used the tmux-yank plugin.

I think the solution you have here works quite well.

08 Sep 2017, 14:03
Roland Berger (1 post)

Hi Brian

I’m using tmux version 2.5. Can you please rewrite a summary of the chapter “REMAPPING COPY AND PASTE KEYS” here in this blog. Somehow ‘V’ ‘r’ and ‘y’ do not seem to work on my linux mint 18.1 (based on ubuntu 16.04).

Here is my current setting for copy-mode stuff. A mix from your book and from this

Best regards & thanks for the book


unbind [
bind-key Escape copy-mode
bind-key p paste-buffer
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'V' send -X select-line
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel
bind-key -T copy-mode-vi 'r' send -X rectangle-toggle
bind-key -T copy-mode-vi Escape send -X cancel "xclip -in -selection clipboard"
You must be logged in to comment