From 4f5d85382346784081fe7a4bbfdc2559ec7ff883 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Thu, 4 Jul 2024 11:45:42 +0200 Subject: [PATCH] tmux: Support `yy` in copy-mode-vi --- .config/tmux/tmux.conf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index b187729..1fdb17b 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -139,8 +139,13 @@ bind -T copy-mode-vi y \ send -X copy-pipe } { command-prompt -k -p (operator-pending) { - send -X begin-selection - send "%%" + # do line-wise yank on yy + if -F "#{==:%%,y}" { + send -X select-line + } { + send -X begin-selection + send "%%" + } send -X copy-pipe } }