Add more vim like copy-mode bindings

This commit is contained in:
Kenneth Benzie 2025-06-22 20:59:25 +01:00
parent d0bc106279
commit 09fdaebbe7

View File

@ -91,7 +91,14 @@ unbind -T copy-mode-vi C-j
# Enter copy mode with C-U # Enter copy mode with C-U
bind C-u copy-mode -u bind C-u copy-mode -u
# Begin selection in copy mode with v not Space # Begin selection in copy mode with v not Space
bind -T copy-mode-vi v send-keys -X begin-selection bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi V send -X select-line
# FIXME: C-v mapping is not limited to only copy mode so it never gets through
# to zsh/nvim etc which is not acceptable.
# bind -T copy-mode-vi C-v send -X rectangle-toggle
# Exit copy mode with i/a
bind -T copy-mode-vi 'i' send -X cancel
bind -T copy-mode-vi 'a' send -X cancel
# Search without entering copy-mode first # Search without entering copy-mode first
bind '/' 'copy-mode;send-keys /' bind '/' 'copy-mode;send-keys /'
bind '?' 'copy-mode;send-keys ?' bind '?' 'copy-mode;send-keys ?'