tmux vim copy mode

This commit is contained in:
Gabriel Augendre 2024-02-17 20:45:36 +01:00
parent c676bb0d12
commit 0979c949f4

View file

@ -24,8 +24,20 @@ set -g mouse on
# don't rename windows automatically
set-option -g allow-rename off
#set-window-option -g mode-keys vi
# vim mode for copying
setw -g mode-keys vi
# prefix + v to enter copy mode
bind v copy-mode
# v to start a visual selection
bind -T copy-mode-vi v send -X begin-selection
# y to yank
bind -T copy-mode-vi y send -X copy-pipe-and-cancel
# prefix + P to paste
bind P paste-buffer
# mouse support
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel
# color support
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",xterm-256color:Tc"