2 ms·
You can have your mouse copy and get you out of copy mode like this: # native mode, if your terminal supports it bind-key -T copy-mode-vi MouseDragEnd1Pane
by ianthehenry 6y ago
You can have your mouse copy and get you out of copy mode like this:
# native mode, if your terminal supports it
bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel
# or if you're using X, and want it to work like any other program
bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel 'xclip -i -selection primary'
The scroll thing is a little hairier looking:
bind -n WheelUpPane if -Ft= "#{mouse_any_flag}" { send -M } { if -Ft= "#{pane_in_mode}" { send -M } { copy-mode -t= }
That's just the default binding for WheelUpPane, except using bare copy-mode instead of copy-mode -e (-e is auto-exit when you scroll to the bottom).