Skip to content

Commit

Permalink
tmux:<prefix>y copy tmux buffer to system clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
laixintao committed Aug 15, 2017
1 parent 7766388 commit e81f1a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .tmux.conf
Expand Up @@ -108,3 +108,9 @@ bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# paste
# getting tmux to copy a buffer to system clipboard
set-option -g default-command "reattach-to-user-namespace -l zsh" # or bash...
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy" \; display-message "Copied tmux buffer to system clipboard"
bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"

0 comments on commit e81f1a4

Please sign in to comment.