Tmux Part 3: Navigation

If you are using tmux 2.4 or later, the instructions for enabling copy and paste on OS X will not work. These lines seem to be the 2.4 compatible equivalent of the suggested configuration:

# Use vim keybindings in copy mode
setw -g mode-keys vi

# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"

# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"

References: tmux 2.4 changelog and the man page section “Windows and panes”.

1 Like