Be sure to first run:
brew install reattach-to-user-namespace
# ======================================================================= | |
# vim-style copy and paste | |
setw -g mode-keys vi | |
bind ] paste-buffer | |
bind-key -t vi-copy 'v' begin-selection | |
bind-key -t vi-copy 'y' copy-pipe "reattach-to-user-namespace pbcopy" | |
bind-key -t vi-copy Space rectangle-toggle | |
# Update default binding of `Enter` to also use copy-pipe | |
unbind -t vi-copy Enter | |
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" | |
# ======================================================================= |