commit d20b64f12b48a6f279f210f886d97911cc1c709f parent 69792d2cad4b6b77648c0e72355c9660bf1c15c4 Author: Chris Bracken <chris@bracken.jp> Date: Tue, 18 Nov 2025 11:08:52 +0900 tmux: support double-click to copy word Diffstat:
| M | .config/tmux/tmux.conf | | | 7 | +++++++ |
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf @@ -54,6 +54,13 @@ bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel "pbcopy" bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy" bind-key -T copy-mode-vi 'r' send-keys -X rectangle-toggle +# Support double-click to copy a whole word. +set -g word-separators " '\"()[]{}<>" +bind -T copy-mode-vi DoubleClick1Pane \ + select-pane \; \ + send-keys -X select-word \; \ + send-keys -X copy-pipe-and-cancel "pbcopy" + # Bindings: Clear screen and reset the scroll buffer. bind-key b send-keys -R C-l\; clear-history