-
Notifications
You must be signed in to change notification settings - Fork 6
/
.tmux.osx.clipboard
executable file
·28 lines (21 loc) · 1.05 KB
/
.tmux.osx.clipboard
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# OSX Clipboard support
# set-option -g default-command "reattach-to-user-namespace -l /bin/bash"
# bind C-v run \
# "tmux set-buffer \"$(reattach-to-user-namespace pbpaste)\"; tmux paste-buffer"
bind C-c run "tmux save-buffer - | pbcopy"
bind C-v run "tmux set-buffer \"$(pbpaste)\"; tmux paste-buffer"
# tmux 2.3 - press y in copy mode to copy selection to clipboard
# bind -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# tmux 2.3 - press enter in copy mode to send to clipboard
# unbind -t vi-copy Enter
# bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
#
# tmux 2.4
# bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
# unbind -T copy-mode-vi Enter
# bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# tmux 2.6
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"