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.
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.
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
I’ve not used the tmux-yank plugin.
I think the solution you have here works quite well.
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 https://shapeshed.com/custom-vim-bindings-in-tmux-2-4/
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"