From e29f4cb0300ef042defce4e725d9999d376a07ba Mon Sep 17 00:00:00 2001 From: Bas van den Wollenberg Date: Sat, 16 Mar 2024 21:21:44 +0100 Subject: [PATCH] tmux copy-paste workaround/fix? --- nvim/.config/nvim/lua/plugins.lua | 3 +++ tmux/.tmux.conf | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 508c93e..5d58c98 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -708,6 +708,9 @@ require("lazy").setup({ { "", "lua require('tmux').resize_right()", desc = "Resize right", mode = { "n", "t" } }, }, opts = { + copy_sync = { + redirect_to_clipboard = true, + }, resize = { enable_custom_bindings = false, resize_step_x = 5, diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 77613f9..d3e1ab5 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -35,9 +35,12 @@ set -g set-titles on set -g focus-events on # use vim keybinds in copy mode -bind -T copy-mode-vi i send-keys -X cancel bind -T copy-mode-vi v send-keys -X begin-selection -bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel +bind -T copy-mode-vi C-v send-keys -X rectangle-toggle +bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy" +bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "wl-copy" +bind -T copy-mode-vi i send-keys -X cancel +bind -T copy-mode-vi Escape send-keys -X cancel # plugins -- 2.51.2