From 7e07be71e7d7b82d9e56abd307c6635f519fe37f Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Sat, 13 Jun 2020 15:47:09 +0000 Subject: [PATCH] tmux: vi-mode syntax changed in 2.4 Signed-off-by: Alejandro Mery --- files/.tmux.conf | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/files/.tmux.conf b/files/.tmux.conf index 192397b..6883d76 100644 --- a/files/.tmux.conf +++ b/files/.tmux.conf @@ -7,6 +7,8 @@ run-shell "\ # https://github.com/tmux/tmux/blob/master/CHANGES # +# 2.4 +# * vi-copy syntax changes # 2.2 # * UTF8 autodetected, `set status-utf8` not accepted. # @@ -79,8 +81,14 @@ bind -r L resize-pane -R 5 # buffers # bind = paste-buffer -bind -t vi-copy 'v' begin-selection -bind -t vi-copy 'y' copy-selection +if-shell -b 'test $TEST_VERSION -lt 204' "\ + bind -t vi-copy 'v' begin-selection; \ + bind -t vi-copy 'y' copy-selection; \ +" +if-shell -b 'test $TMUX_VERSION -ge 204' "\ + bind-key -T copy-mode-vi v send -X begin-seletion; \ + bind-key -T copy-mode-vi y send -X copy-seletion; \ +" # clear scroll #