File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -62,11 +62,6 @@ bind-key a send-prefix
62
62
setw -g monitor-activity on
63
63
set -g visual-activity on
64
64
65
- # Vi copypaste mode
66
- set-window-option -g mode-keys vi
67
- bind-key -t vi-copy ' v' begin-selection
68
- bind-key -t vi-copy ' y' copy-selection
69
-
70
65
# hjkl pane traversal
71
66
bind h select-pane -L
72
67
bind j select-pane -D
@@ -94,6 +89,11 @@ set -g default-terminal "screen-256color"
94
89
run-shell " tmux set-environment -g TMUX_VERSION_MAJOR $( tmux -V | cut -d' ' -f2 | cut -d' .' -f1 | sed ' s/[^0-9]*//g' ) "
95
90
run-shell " tmux set-environment -g TMUX_VERSION_MINOR $( tmux -V | cut -d' ' -f2 | cut -d' .' -f2 | sed ' s/[^0-9]*//g' ) "
96
91
92
+ # Vi copypaste mode
93
+ set-window-option -g mode-keys vi
94
+ if-shell " test '\( #{$TMUX_VERSION_MAJOR } -eq 2 -a #{$TMUX_VERSION_MINOR } -ge 4 \)'" ' bind-key -Tcopy-mode-vi v send -X begin-selection; bind-key -Tcopy-mode-vi y send -X copy-selection-and-cancel'
95
+ if-shell ' \( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 4\) -o #{$TMUX_VERSION_MAJOR} -le 1' ' bind-key -t vi-copy v begin-selection; bind-key -t vi-copy y copy-selection'
96
+
97
97
# status bar
98
98
if-shell ' \( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 2\) -o #{$TMUX_VERSION_MAJOR} -le 1' ' set-option -g status-utf8 on'
99
99
You can’t perform that action at this time.
0 commit comments