Remap v and y for tmux copy mode
dblume

dblume commited on 2022-07-22 12:41:45
Showing 1 changed files, with 6 additions and 0 deletions.

... ...
@@ -8,6 +8,12 @@ bind-key a send-prefix
8 8
 # No delay for escape key press (vim mode changes)
9 9
 set -sg escape-time 0
10 10
 
11
+# Copy mode more intuitive for vim users, use v and y
12
+# From https://dev.to/iggredible/the-easy-way-to-copy-text-in-tmux-319g
13
+# See https://ianthehenry.com/posts/how-to-configure-tmux/ for copy-pipe tips.
14
+bind -T copy-mode-vi v send -X begin-selection
15
+bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel
16
+
11 17
 # Vim style pane splitting
12 18
 bind-key v split-window -h
13 19
 bind-key s split-window -v
14 20