extra: tmux: add some copy-mode-vi keybinds

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
Christoph Heiss 2024-04-19 23:22:17 +02:00
parent c1faa61748
commit 16e7b52d69
Signed by: c8h4
GPG key ID: 6817E9C75C0785D7

View file

@ -1,3 +1,5 @@
# run `tmux list-keys` to get all current key mappings
unbind-key '"'
unbind-key %
@ -59,8 +61,20 @@ set-window-option -g automatic-rename
# Vi copypaste mode
set-option -g mode-keys vi
# selection & copy
bind-key -Tcopy-mode-vi v send -X begin-selection
bind-key -Tcopy-mode-vi y send -X copy-selection-and-cancel
# movement
bind-key -Tcopy-mode-vi d send -X cursor-left
bind-key -Tcopy-mode-vi h send -X cursor-down
bind-key -Tcopy-mode-vi t send -X cursor-up
bind-key -Tcopy-mode-vi n send -X cursor-right
# scrolling
bind-key -Tcopy-mode-vi C-e send -X halfpage-down
bind-key -Tcopy-mode-vi C-u send -X halfpage-up
# search
bind-key -Tcopy-mode-vi l send -X search-again
bind-key -Tcopy-mode-vi L send -X search-reverse
# Detach client
bind-key C-d detach-client