How do I select entire words with Tmux's mouse mode?

The default tmux mouse mode seems to select words by character -- this is a little too granular for me; if I click [or double-click] in the middle of a word, I'd like it to start selecting the entire word.

Are there any ways to accomplish this? Thanks much!


Solution 1:

Hold Shift and double-click the text. This sends the mouse input directly to the terminal (xterm, terminal, etc) and bypasses tmux's mouse mode.

Note: I tested this in xterm and gnome-terminal. For other terminals you may need to hold a different modifier key.

Solution 2:

not without patching your tmux source code, sorry. hopefully such a feature can be added to tmux in the future

Solution 3:

Looks like xtmux could do that, but that won't apply over ssh. The iTerm equivalent of Shift is Alt. I haven't found a pure tmux solution, but you might consider vim mode copy/paste: set-window-option -g mode-keys vi bind-key -t vi-copy 'v' begin-selection bind-key -t vi-copy 'y' copy-selection bind-key -t vi-copy 'Escape' copy-selection With that and set -g mode-mouse on, you can click and hold at the beginning of your selection, hit w and other vim commands until you have what you want selected, and then release.