From cd337bf3d48f5132a513f092bb68b21570e8d660 Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Sun, 20 Feb 2022 13:55:20 -0500 Subject: [PATCH] tmux: Add v/y vi-like copy-mode commands I want to begin selection using `v` and yank with `y`. Also... anti-vi, but I like to use the mouse for copy-mode sometimes.. :shrug: --- .tmux.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.tmux.conf b/.tmux.conf index 27ad174..fc14068 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,6 +1,7 @@ # .tmux.conf set-option -g history-limit 10000 set-option -g mode-keys vi +set-option -g mouse on # better prefix set-option -g prefix C-a @@ -16,6 +17,10 @@ bind-key C-j select-pane -D bind-key C-k select-pane -U bind-key C-l select-pane -R +# vi-like selection in copy-mode +bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel +bind-key -T copy-mode-vi v send-keys -X begin-selection + # Use | and - for more intuitive splits (in the same location!) bind-key | split-window -c "#{pane_current_path}" -h bind-key - split-window -c "#{pane_current_path}" -v -- libgit2 1.1.1