more tmux copy mode configs: v starts selection, square back to C-v
This commit is contained in:
parent
1fccc1e05e
commit
074c8732f2
@ -24,3 +24,9 @@
|
||||
helper = /usr/local/share/gcm-core/git-credential-manager
|
||||
[credential "https://dev.azure.com"]
|
||||
useHttpPath = true
|
||||
[credential "https://github.com"]
|
||||
helper =
|
||||
helper = !/opt/homebrew/bin/gh auth git-credential
|
||||
[credential "https://gist.github.com"]
|
||||
helper =
|
||||
helper = !/opt/homebrew/bin/gh auth git-credential
|
||||
|
||||
@ -13,29 +13,35 @@ bind C-a send-prefix -2
|
||||
# reload configuration
|
||||
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -s extended-keys on
|
||||
set -s set-clipboard on
|
||||
set -s set-clipboard external
|
||||
set -as terminal-features ",xterm-kitty:RGB"
|
||||
set -as terminal-features ",xterm-kitty:clipboard"
|
||||
set -as terminal-features ",xterm-kitty:extkeys"
|
||||
set -as terminal-features ",xterm:RGB"
|
||||
set -as terminal-features ",xterm:clipboard"
|
||||
set -as terminal-features ",xterm-ghostty:RGB"
|
||||
set -as terminal-features ",xterm-ghostty:clipboard"
|
||||
set -as terminal-features ",xterm-ghostty:extkeys"
|
||||
set -as terminal-features ",xterm-256color:RGB"
|
||||
set -as terminal-features ",xterm-256color:clipboard"
|
||||
set -as terminal-features ",xterm-256color:extkeys"
|
||||
set -as terminal-features ",screen-256color:clipboard"
|
||||
set -as terminal-overrides ",xterm-256color:Ms=\\E]52;c;%p2%s\\007"
|
||||
set -as terminal-overrides ",screen-256color:Ms=\\E]52;c;%p2%s\\007"
|
||||
set -as terminal-overrides ",xterm-256color:Ms=\E]52;c;%p2%s\007"
|
||||
set -as terminal-overrides ",screen-256color:Ms=\E]52;c;%p2%s\007"
|
||||
set -g allow-passthrough on
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
# Copy selections via tmux's OSC 52 clipboard support.
|
||||
bind-key -T copy-mode-vi Enter send-keys -X copy-selection-and-cancel
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
||||
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection-and-cancel
|
||||
# Copy selections by writing OSC 52 directly to the pane tty. This avoids the
|
||||
# broken tmux load-buffer -w path seen under mosh, and works across macOS,
|
||||
# Linux, FreeBSD, and OpenBSD with $HOME/.local/bin/yank-osc52.
|
||||
bind-key -n MouseDrag1Pane if-shell -F '#{mouse_any_flag}' 'send-keys -M' 'copy-mode -M'
|
||||
bind-key -n MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel '$HOME/.local/bin/yank-osc52 > #{pane_tty}'
|
||||
bind-key -n DoubleClick1Pane select-pane -t = \; copy-mode -H \; send-keys -X select-word \; run-shell -b 'sleep 0.2; tmux send-keys -X -t "#{pane_id}" copy-pipe-and-cancel "$HOME/.local/bin/yank-osc52 > #{pane_tty}"'
|
||||
bind-key -n TripleClick1Pane select-pane -t = \; copy-mode -H \; send-keys -X select-line \; run-shell -b 'sleep 0.2; tmux send-keys -X -t "#{pane_id}" copy-pipe-and-cancel "$HOME/.local/bin/yank-osc52 > #{pane_tty}"'
|
||||
bind-key -T copy-mode-vi Space send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
||||
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel '$HOME/.local/bin/yank-osc52 > #{pane_tty}'
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel '$HOME/.local/bin/yank-osc52 > #{pane_tty}'
|
||||
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel '$HOME/.local/bin/yank-osc52 > #{pane_tty}'
|
||||
bind-key -T copy-mode-vi DoubleClick1Pane send-keys -X select-word \; run-shell -b 'sleep 0.2; tmux send-keys -X -t "#{pane_id}" copy-pipe-and-cancel "$HOME/.local/bin/yank-osc52 > #{pane_tty}"'
|
||||
bind-key -T copy-mode-vi TripleClick1Pane send-keys -X select-line \; run-shell -b 'sleep 0.2; tmux send-keys -X -t "#{pane_id}" copy-pipe-and-cancel "$HOME/.local/bin/yank-osc52 > #{pane_tty}"'
|
||||
|
||||
# Nova Config
|
||||
set -g @nova-nerdfonts true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user