4

I am running ubuntu 12.04.5 lts. When I do a mouse double click selection I would like to select only a current word. For example in a line like:

/home/xx/asdf

right now the whole line gets selected when I doulble click on "xx". Also in a line like:

 $asdf=

I would like to select the 1st five characters - include $ in the selection. Right now it selects asdf= - 5 characters including the equal sign.

4

For gnome-terminal:

In the menu bar, under Edit : Profile Preferences, tab General you will find Select-by-word chatacters. If you want the terminal to consider / to be a word boundary for selection purposes, remove / from the list of characters.

3

In some cases gnome-terminal preferences doesn't have the select-by-word characters option. It still has the profile-ID you need for command-line configuration though: Obtain it in the edit -> profile preferences -> General tab on your profile.

use

dconf list /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/

to check whether it works. If no output, then the profile-id is not b1dcc9dd-5262-4d8d-a863-c897e6d979b9, copy pate the one from the preferences as descibed above.

then use:

dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/word-char-exceptions '@ms "-,.;?%&#_+@~·:$"'

with the correct profile-ID. Here I remove / and = from the list but add $ according to the OP's wish.

Note that you can still select a word which is split by this character, say iceweasel/stable : double-click on the first part, then hold the shift key and click on the second part.

  • "anymore" is a bit ambiguous. The select-by-word characters option is still there in Gnome Terminal 2.31.3, which is on a RHEL 6.5 (Santiago) system running Gnome 2.28.2. Additionally, dconf isn't on the system. – Randall Nov 13 '15 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.