When I double-click to select text in GNOME Terminal, the selection stops at spaces but continues over hyphens:
Some of my filenames contain uncommon characters such as the heavy teardrop-spoked asterisk and are not selectable by double-clicking:
Is there a way to make double-click selection continue over these characters as well?
[Adding an answer since the accepted one no longer works.]
Script
I put this together into a script to set the word separators:
https://github.com/ab/ubuntu-wart-removal/blob/master/gnome-terminal-word-separators.sh
Background
GNOME Terminal has flip flopped several times on this subject.
This configuration feature 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.Editing with dconf
Per these instructions, you can configure the set using dconf: https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1401207/comments/8
I like to use
-#%&+,./:=?@_~
as the set of non-word-separators.In "Edit > Profile Preferences > General", add the character to the "Select-by-word characters" box.
Other answers do not work today ... this works on ubuntu 18.04 ... first identify your UUID gnome terminal profile id ... issue this in terminal
now make change :
until ubuntu 18.04 gets fixed the following read command silently fails whereas it worked fine on ubuntu 16.04
A very useful default feature implemented in other terminals is the progressive selection of extended sections of a line on the screen. e.g., given
double-clicking on, say,
filenr
indsr.filenr_34.ctr
would progress fromfilenr
to:Surrounding symmetries may be solved by adding pairs until next-level delimiter.
And of course the user should be given the option of changing defaults.
Extending @alberge answer, you can execute the following
python3
script to change all your profiles to do this:Or you can just execute: