tmux: better key bindings for copy-mode

This commit is contained in:
Fernando Schauenburg 2024-02-14 02:47:29 +01:00
parent a6beb8a726
commit 97a9d2b9a9

View file

@ -5,6 +5,8 @@ set -g prefix C-space
# #
bind C-space send-prefix bind C-space send-prefix
bind R source-file "$XDG_CONFIG_HOME/tmux/tmux.conf"\; display "RELOADED" bind R source-file "$XDG_CONFIG_HOME/tmux/tmux.conf"\; display "RELOADED"
bind v copy-mode
bind p paste-buffer
# Window/pane management (new windows/panes use the path in current pane) # Window/pane management (new windows/panes use the path in current pane)
bind c new-window -c '#{pane_current_path}' bind c new-window -c '#{pane_current_path}'
@ -49,8 +51,10 @@ bind C-m set main-pane-width 50% \; select-layout main-vertical
bind C-e select-layout even-horizontal bind C-e select-layout even-horizontal
bind C-t select-layout tiled bind C-t select-layout tiled
# Stay in copy mode on drag end # Copy mode
unbind-key -T copy-mode-vi MouseDragEnd1Pane bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-selection
unbind -T copy-mode-vi MouseDragEnd1Pane # Stay in copy mode on drag end.
# #
# General # General