Underscore must be a part of the word

Bug #615506 reported by Dmitry Kann
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
gedit
Fix Released
Wishlist
gedit (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Binary package hint: gedit

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 all other word related operations.

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).

NB: This is not a duplicate of https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/413360 !

The above entry only refers to selecting words with double-click.
Mine is more general: the problem applies to all operations supposed to affect whole words:
  - Double-click selection
  - Next/Prev Word (Ctrl+Left/Right)
  - Find and Replace with Match entire word only turned on
  - Title Case command from Change Case plugin
  - Spell-checking

One of the most often recommended solutions is Click_Config plugin at http://code.google.com/p/gedit-click-config/

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.

Originally posted as a question: https://answers.launchpad.net/ubuntu/+source/gedit/+question/120519

gedit 2.30.3, Ubuntu 10.04.1 LTS 32-bit.

Tags: lucid
Revision history for this message
dazza5000 (darran-kelinske) wrote :

I attached the upstream bug.

Note: I am able to use Find and Replace with Match entire word only turned on correctly.

Changed in gedit (Ubuntu):
status: New → Confirmed
Revision history for this message
Philip Muškovac (yofel) wrote :

Setting Wishlist on drizzles request. Thanks for finding the upstream report.

Changed in gedit (Ubuntu):
importance: Undecided → Wishlist
status: Confirmed → Triaged
tags: added: lucid
Changed in gedit:
status: Unknown → Confirmed
Changed in gedit:
importance: Unknown → Wishlist
Changed in gedit:
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (7.6 KiB)

This bug was fixed in the package gedit - 3.18.1-1ubuntu1

---------------
gedit (3.18.1-1ubuntu1) xenial; urgency=medium

  * Newer upstream version and merge on Debian, includes those changes
    - code snippets plugin improvements (lp: #1335613)
    - implements a minimap widget (lp: #1302451)
    - don't close infobar after print preview is dismissed (lp: #929554)
    - some segfault fixes (lp: #928420)
    - save files even when backups can't be created (lp: #867923)
    - let you edit binary files (lp: #848253, #575500)
    - count underscores are part of a word (lp: #615506, #413360)
    - don't display warnings when saving after foccusing out (lp: #589906)
    - use correct printing margins (lp: #331077)
    - ctrl-T opens new tabs (lp: #301942)
    - hide print preview tooltips when moving the cursor (lp: #234711)
    - include word wrap option in the statusbar popover (lp: #118522)
  * debian/control.in:
    - don't Build-Depends on gnome-icon-theme-symbolic it's deprecated
    - gedit replaces gedit-common (<< 3.18.1-1ubuntu1)
    - updated the requirements
  * debian/patches/06_lp_401692.patch:
    - dropped, the change is included upstream now
  * debian/rules:
    - create compatiblity desktop file for upgraders
  * Remaining other changes
  * debian/rules:
    - Build without --Bsymbolic-functions to fix issues
  * debian/patches/0001-Use-the-OSX-menubar-layout-for-XFCE-Unity-etc.patch:
    - add traditional menubar (GNOME bug #741904)
  * debian/patches/02_add_keywords.patch:
    - Add new keywords for unity and gnome-shell
  * debian/patches/05_menu_label.patch:
    - Don't display in menu as "gedit Text Editor"
  * debian/patches/07_use_del_instead_ctrl_del.patch:
    - Use Delete, not Ctrl+Delete, to delete files in file browser
      side panel to match our Nautilus behavior (LP: #1163287)

  [ Lars Uebernickel ]
  * New upstream version (lp: #1339371)
  * debian/patches/01_gedit-bugreport-location.patch,
    debian/patches/02_add_keywords.patch,
    debian/patches/05_menu_label.patch:
    - update for new desktop file name
  * debian/patches/03_no_gnu_gettext.patch,
    debian/patches/06_lp_401692.patch,
    debian/patches/07_use_del_instead_ctrl_del.patch,
    debian/patches/08_multiarch_fallback.patch:
    - refresh
  * debian/patches/disable-warnings.patch:
    - dropped - should be fewer deprecation warnings now
  * debian/patches/00git_state_property_type.patch,
    debian/patches/fix_snippets_encoding.patch,
    debian/patches/fix_snippets_python34.patch,
    debian/patches/fix_snippet_warning.patch,
    debian/patches/git_encoding_combo.patch,
    debian/patches/git_filebrowser_toolbar.patch,
    debian/patches/git_get_start_sig.patch,
    debian/patches/git_save_run_tool_order.patch,
    debian/patches/git-search-hide-when-hitting-Esc.patch,
    debian/patches/git-search-use-new-GtkSearchEntry-signals.patch,
    debian/patches/git_select_mispelled_word.patch,
    debian/patches/git_Show-preview-text-in-the-font-chooser.patch,
    debian/patches/git_store_dialog.patch,
    debian/patches/git_wrap_labels.patch:
    - dropped - applied upstream
  * debian/patches/git_zeitgeist_crash.patch:
    - dropped - moved to ge...

Read more...

Changed in gedit (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Wissam (wisebtp) wrote :

Hello to you all,

I was not aware that this been filed as a bug! The matter of fact, myself and many others thought of it as an advantage of gedit over other editors and we do use it intensively.
Now, we do seriously miss it after upgrading to ubuntu 16.04 which comes shipped with the latest gedit version.

But, since there are different preferences here as you may find, perhaps an option under preferences would be great where one can enjoy gedit treating underscore as word delimiter or the other way.

Thank you,

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.