9/14/2013 - 4:23 PM

Shared Clipboard: vim,tmux,macos

One clipboard to rule them all. Requires tmux >= 1.8. Thanks @thoughtbot

Tell vim to use the system clipboard:

" ~/.vimrc
set clipboard=unnamed " use the system clipboard

Install reattach-to-user-namespace:

$ brew install reattach-to-user-namespace

Send the tmux clipboard to pbcopy:

# ~/.tmux.conf
# copy with 'enter' and send to mac os clipboard:
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"