From 97a9d2b9a909fa3ecf8cf524531d7f262e056492 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Wed, 14 Feb 2024 02:47:29 +0100 Subject: [PATCH] tmux: better key bindings for copy-mode --- config/tmux/tmux.conf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf index 48c234c..0ccfec0 100644 --- a/config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -5,6 +5,8 @@ set -g prefix C-space # bind C-space send-prefix bind R source-file "$XDG_CONFIG_HOME/tmux/tmux.conf"\; display "RELOADED" +bind v copy-mode +bind p paste-buffer # Window/pane management (new windows/panes use the path in current pane) bind c new-window -c '#{pane_current_path}' @@ -49,8 +51,10 @@ bind C-m set main-pane-width 50% \; select-layout main-vertical bind C-e select-layout even-horizontal bind C-t select-layout tiled -# Stay in copy mode on drag end -unbind-key -T copy-mode-vi MouseDragEnd1Pane +# Copy mode +bind -T copy-mode-vi v send-keys -X begin-selection +bind -T copy-mode-vi y send-keys -X copy-selection +unbind -T copy-mode-vi MouseDragEnd1Pane # Stay in copy mode on drag end. # # General