Skip to content

Instantly share code, notes, and snippets.

@lgmkr
Created December 8, 2015 09:45
Show Gist options
  • Save lgmkr/8ee032b7c2f0f15645ca to your computer and use it in GitHub Desktop.
Save lgmkr/8ee032b7c2f0f15645ca to your computer and use it in GitHub Desktop.
set-window-option -g xterm-keys on
set-window-option -g mode-keys vi
# bind for use vim-like copy/paste in scroll mode
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# bind for reload config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded."
# copy/paste in system
# need to setup brew install reattach-to-user-namespace
set-option -g default-command "reattach-to-user-namespace -l zsh" # or bash...
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
bind C-v 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