Simple fix to Gnome Terminal

I often double click on a filename or folder and then paste it with the middle button (the scroll wheel), in Linux. What annoyed me was that it doesn't get the ~ character so if I'm cutting an pasting my current path as shown on the command line
scott@home:~/src/folder/name$
Double click, middle click gives me /src/folder/name and not ~/src/folder/name. How annoying, I have to cursor all the way to the beginning and enter the tilde character.
Even worse if there's an error message like:
Error in ~/src/folder/name.cc:123
Double click, middle click gives me now /src/folder/name.cc:123. Now I have to edit both sides.

The fix is simple, go to your Gnome Terminal|Profiles... and edit your default profile. The first pane called "General" and has a field called "Select-by-word characters". Add the tilde (~) and remove the colon (:) and you're done.
There, I just saved you 2 thousand keystrokes a year.

Comments

Kumar said…
Great tip! Thanks
Justin Cook said…
...more than 2K a year for me. many thanks!
Julien. said…
Very nice !

Thank you. I use terminator on ubuntu , it's almost the same :

- Right click anywhere in the terminal
- Choose Preferences
- Second Tab : Profiles/General
- Select-by-word characters

Set to :

-A-Za-z0-9,./?%&#~_
LambiekNL said…
Very nice, exactly where I was looking for, thanks. I also removed the '=' character in my version.
Anonymous said…
Thanks, it saved a lot of annoyance. I was looking exactly for this piece of advice :-)

~
Sapan said…
I can't believe I had the solution right next to me while I was searching it across the internet. I was looking for something else in terminator settings and found this. Thanks for the clarification. I have the exact same use case.

Popular posts from this blog

Shortest Sudoku solver in Python

Key-Train Launched