Underscore must be a part of the word!

Asked by Dmitry Kann

Any known to me text editor (not a text processor) would treat underscore character '_' as a part of the word it's attached to, but gedit does not. This causes all word-related actions to be limited to only part of the word, e.g.:

create_if_doesnt_exist=1

where 'create_if_doesnt_exist' is essentially one word, but double-click on 'create' selects only this part of the word. The same applies to Replace with 'Match entire word only' turned on.

This is incorrect and undesirable in many cases. There must be at least an option to make underscore one of the word chars (like \w in regexes).

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gedit Edit question
Assignee:
No assignee Edit question
Solved by:
PeterPall
Solved:
Last query:
Last reply:
Revision history for this message
Best PeterPall (peterpall) said :
#1

I agree with you. IMHO this missing feature in most cases acts as a bug.

http://stackoverflow.com/questions/2783402/gedit-underscore-as-a-word-character tells there is a plugin, though, that should help you: http://code.google.com/p/gedit-click-config/

Revision history for this message
Dmitry Kann (yktooo) said :
#2

Thanks Peter, this plugin is known to me.

However I think it's a wrong way of resolving this issue.

The problem isn't about clicks, it's about determining what is a part of the word, and what isn't. Fixing clicks does not root the cause.

That wouldn't help replacing whole words, for example, nor would it act as expected in other cases, eg. when a plugin scans for identifiers in the text.

Revision history for this message
PeterPall (peterpall) said :
#3

At least this seems to be a long-outstanding feature-request, so we can hope it will be solved in the next version of the program.

Revision history for this message
Dmitry Kann (yktooo) said :
#4

Bug submitted: https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/615506
I was flabbergasted at the fact the issue hasn't ever been reported since gedit came to exist.