From e020b5ecdfb4e5ec20f567fb67219c4e713b18dd Mon Sep 17 00:00:00 2001 From: johannst Date: Sun, 14 May 2017 18:25:01 +0200 Subject: adapted tmux.conf to handle different versions --- tmux.conf | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'tmux.conf') diff --git a/tmux.conf b/tmux.conf index 32b5a85..8498f75 100644 --- a/tmux.conf +++ b/tmux.conf @@ -40,10 +40,15 @@ bind-key l select-pane -R # Copy mode settings set-window-option -g mode-keys vi -bind-key -t vi-copy 'v' begin-selection -bind-key -t vi-copy 'y' copy-selection -bind-key -t vi-copy 'C-a' start-of-line -bind-key -t vi-copy 'C-e' end-of-line +if-shell "if [ $(echo \"$(tmux -V | awk '{print $2}') < 2.4\" | bc) -eq 1 ]; then true; else false; fi" \ + 'bind-key -t vi-copy v begin-selection; \ + bind-key -t vi-copy y copy-selection; \ + bind-key -t vi-copy C-a start-of-line; \ + bind-key -t vi-copy C-e end-of-line' \ + 'bind-key -T copy-mode-vi v send-key -X begin-selection; \ + bind-key -T copy-mode-vi y send-key -X copy-selection-and-cancel; \ + bind-key -T copy-mode-vi C-a send-key -X start-of-line; \ + bind-key -T copy-mode-vi C-e send-key -X end-of-line;' bind-key C-b choose-buffer bind-key C-v copy-mode bind-key C-p paste-buffer -- cgit v1.2.3