tmux: add copy/paste hooks
This commit is contained in:
9
tmux.mac.conf
Normal file
9
tmux.mac.conf
Normal file
@@ -0,0 +1,9 @@
|
||||
# Prefix Ctrl-C takes what's in the buffer and sends it to system clipboard via pbcopy
|
||||
bind C-c run "tmux save-buffer - | pbcopy"
|
||||
|
||||
# y in copy mode takes selection and sends it to system clipboard via pbcopy
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
|
||||
|
||||
# Prefix Ctrl-v fills tmux buffer from system clipboard via pbpaste, then
|
||||
# pastes from buffer into tmux window
|
||||
bind C-v run "tmux set-buffer \" $(pbpaste)\"; tmux paste-buffer"
|
||||
Reference in New Issue
Block a user