Yes, GNOME Terminal has a setting word-char-exceptions that controls which punctuation characters are considered to break words for double-click selection.
By default, all punctuation will break words, but characters in the exceptions list are instead considered part of the word.
There used to be a UI for it, but that was removed in gnome-terminal 3.14 (Ubuntu 15.04), so now it can only be set via dconf or dconf-editor.
I like to use #%&+,-./:=?@_~ as the set of non-word-separators.
Script
I put this together into a script to set the word separators:
https://github.com/ab/ubuntu-wart-removal/blob/main/gnome-terminal-word-separators.sh
Download:
wget https://raw.githubusercontent.com/ab/ubuntu-wart-removal/main/gnome-terminal-word-separators.sh
Usage:
# print help
./gnome-terminal-word-separators.sh -h
set word-char-exceptions for all profiles
./gnome-terminal-word-separators.sh --all '#%&+,-./:=?@_~'
set word-char-exceptions for a specific profile
./gnome-terminal-word-separators.sh -p 8741a4c2-15c8-45bb-86ec-34c3080526a7 '#%&+,-./:=?@_~'
dconf-editor
You can also edit this with a GUI using the dconf-editor.
Find your GNOME Terminal profile's UUID:
menu -> Preferences -> select your profile -> find the Profile ID listed in the bottom right
Your UUID might look like b1dcc9dd-5262-4d8d-a863-c897e6d979b9.

Then open dconf-editor.
- Navigate to
/org/gnome/terminal/legacy/profiles:/.
- Go to your profile's UUID
- Go to
word-char-exceptions
- Set your custom value (must be surrounded by quotation marks)

History
GNOME Terminal has flip flopped several times on this subject.
There used to be a setting in the preferences GUI to manage this, but that was removed in gnome-terminal 3.14 (included in Ubuntu 15.04 Vivid).
Then in gnome-terminal 3.16 (included in Ubuntu 15.10 Wily), the option was reintroduced under the hood, but with no UI. In addition, colon : was changed to be treated as a word separator (removed from exceptions).
Note: The help text description in dconf-editor of word-char-exceptions was backwards for gnome-terminal versions before 3.51.90. https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/8054
:. Is it possible that you could write the command(s) to automatically fetch the default or current profile so I don't have to manually look up my profile ID in order to run that command in future? That way I can just run that script on fresh installs. – Programster Jun 06 '16 at 13:20dconf list /org/gnome/terminal/legacy/profiles:/– A B Jun 07 '16 at 00:13word-char-exceptions, so I can add just one character? – Tor Klingberg Aug 21 '17 at 14:20word-char-exceptionsproperty seems to state that these characters will NOT be considered part of words: "List of ASCII punctuation characters that are not to be treated as part of a word when doing word-wise selection." However, on Ubuntu 22.04.3 LTS, I get the exact opposite behavior, i.e. specifying a value of'_'results in ONLY underscore (and alphanumeric characters) being part of words. Perhaps I just misunderstood the description of this property? – jth Jan 10 '24 at 21:50