Skip to content

Instantly share code, notes, and snippets.

@jlogsdon
Last active December 22, 2015 18:29
Show Gist options
  • Save jlogsdon/6513344 to your computer and use it in GitHub Desktop.
Save jlogsdon/6513344 to your computer and use it in GitHub Desktop.
Requires `reattach-to-user-namespace` found at https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
set -g default-command "reattach-to-user-namespace -l zsh"
setw -g mode-mouse on
setw -g mouse-select-window on
setw -g mouse-select-pane on
setw -g mouse-resize-pane on
setw -g mode-keys vi
bind-key ` copy-mode
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'x' copy-selection
bind-key 'p' run-shell "tmux set-buffer \"$(pbpaste)\"; tmux paste-buffer"
bind-key 'y' send-keys x\; run-shell "reattach-to-user-namespace -l bash -c 'tmux show-buffer | pbcopy'"\; display-message "copied"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment