Skip to content

Instantly share code, notes, and snippets.

@aire-con-gas
Created January 23, 2015 22:15
Show Gist options
  • Select an option

  • Save aire-con-gas/52ea3172a952c4567d02 to your computer and use it in GitHub Desktop.

Select an option

Save aire-con-gas/52ea3172a952c4567d02 to your computer and use it in GitHub Desktop.
local tmux conf overrides
# Add your local tmux config here
# Copy-paste integration
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# 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"
# Bind ']' to use pbpaste
bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment