Skip to content

Commit acfd36e

Browse files
authored
Merge pull request #167 from iloveitaly/put-with-bracketed-paste
paste buffer with bracketed paste
2 parents 1b1a436 + 67526ef commit acfd36e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

yank.tmux

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,32 +44,32 @@ set_copy_mode_bindings() {
4444
copy_command_mouse="$(clipboard_copy_command "true")"
4545
if tmux_is_at_least 2.4; then
4646
tmux bind-key -T copy-mode-vi "$(yank_key)" send-keys -X "$(yank_action)" "$copy_command"
47-
tmux bind-key -T copy-mode-vi "$(put_key)" send-keys -X copy-pipe-and-cancel "tmux paste-buffer"
48-
tmux bind-key -T copy-mode-vi "$(yank_put_key)" send-keys -X copy-pipe-and-cancel "$copy_command; tmux paste-buffer"
47+
tmux bind-key -T copy-mode-vi "$(put_key)" send-keys -X copy-pipe-and-cancel "tmux paste-buffer -p"
48+
tmux bind-key -T copy-mode-vi "$(yank_put_key)" send-keys -X copy-pipe-and-cancel "$copy_command; tmux paste-buffer -p"
4949
tmux bind-key -T copy-mode-vi "$(yank_wo_newline_key)" send-keys -X "$(yank_action)" "$copy_wo_newline_command"
5050
if [[ "$(yank_with_mouse)" == "on" ]]; then
5151
tmux bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X "$(yank_action)" "$copy_command_mouse"
5252
fi
5353

5454
tmux bind-key -T copy-mode "$(yank_key)" send-keys -X "$(yank_action)" "$copy_command"
55-
tmux bind-key -T copy-mode "$(put_key)" send-keys -X copy-pipe-and-cancel "tmux paste-buffer"
56-
tmux bind-key -T copy-mode "$(yank_put_key)" send-keys -X copy-pipe-and-cancel "$copy_command; tmux paste-buffer"
55+
tmux bind-key -T copy-mode "$(put_key)" send-keys -X copy-pipe-and-cancel "tmux paste-buffer -p"
56+
tmux bind-key -T copy-mode "$(yank_put_key)" send-keys -X copy-pipe-and-cancel "$copy_command; tmux paste-buffer -p"
5757
tmux bind-key -T copy-mode "$(yank_wo_newline_key)" send-keys -X "$(yank_action)" "$copy_wo_newline_command"
5858
if [[ "$(yank_with_mouse)" == "on" ]]; then
5959
tmux bind-key -T copy-mode MouseDragEnd1Pane send-keys -X "$(yank_action)" "$copy_command_mouse"
6060
fi
6161
else
6262
tmux bind-key -t vi-copy "$(yank_key)" copy-pipe "$copy_command"
63-
tmux bind-key -t vi-copy "$(put_key)" copy-pipe "tmux paste-buffer"
64-
tmux bind-key -t vi-copy "$(yank_put_key)" copy-pipe "$copy_command; tmux paste-buffer"
63+
tmux bind-key -t vi-copy "$(put_key)" copy-pipe "tmux paste-buffer -p"
64+
tmux bind-key -t vi-copy "$(yank_put_key)" copy-pipe "$copy_command; tmux paste-buffer -p"
6565
tmux bind-key -t vi-copy "$(yank_wo_newline_key)" copy-pipe "$copy_wo_newline_command"
6666
if [[ "$(yank_with_mouse)" == "on" ]]; then
6767
tmux bind-key -t vi-copy MouseDragEnd1Pane copy-pipe "$copy_command_mouse"
6868
fi
6969

7070
tmux bind-key -t emacs-copy "$(yank_key)" copy-pipe "$copy_command"
71-
tmux bind-key -t emacs-copy "$(put_key)" copy-pipe "tmux paste-buffer"
72-
tmux bind-key -t emacs-copy "$(yank_put_key)" copy-pipe "$copy_command; tmux paste-buffer"
71+
tmux bind-key -t emacs-copy "$(put_key)" copy-pipe "tmux paste-buffer -p"
72+
tmux bind-key -t emacs-copy "$(yank_put_key)" copy-pipe "$copy_command; tmux paste-buffer -p"
7373
tmux bind-key -t emacs-copy "$(yank_wo_newline_key)" copy-pipe "$copy_wo_newline_command"
7474
if [[ "$(yank_with_mouse)" == "on" ]]; then
7575
tmux bind-key -t emacs-copy MouseDragEnd1Pane copy-pipe "$copy_command_mouse"

0 commit comments

Comments
 (0)