After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757764 - Builder should support "smarter spaces"
Builder should support "smarter spaces"
Status: RESOLVED OBSOLETE
Product: gnome-builder
Classification: Other
Component: editor
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-11-08 06:41 UTC by James
Modified: 2018-01-11 09:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description James 2015-11-08 06:41:40 UTC
Background:

Some clever chap developed a "smart spaces" plugin for gedit. This caused the backspace key to remove the preceding space_width characters when spaces are used for indentation. In 2013, I expanded on this plugin to add similar support for arrow key movements, and the delete key. I'd absolutely <3 to have this available in GNOME Builder.

Description:

When spaces are used for indentation, and the "smarter arrows" part of the feature is enabled, a left arrow press will move the cursor left up until the indentation boundary. Multiple presses cause you to move multiple times, as if the spaces were being jumped over like tabs. A similar behaviour occurs with the right arrow key.

If you manually put the cursor between two space characters and between two tab alignments, then on first left or right movement, it will only advance to the nearest tab stop, and not jump over eight spaces (or however many the space_width is).

I also recommend adding a setting for "smart keypad arrows" since it was easy to add and perhaps some people browse code with those arrows instead.

Lastly, there should be a "smart delete" option, which essentially functions exactly like "smart backspace", but for the delete character.

Implementation:

I actually implemented all this in python back in 2013. I don't know if my implementation was optimal, but it definitely worked great :)

https://github.com/purpleidea/gedit-plugins/tree/smarterspaces

hergertme asked me to open a bug about this. Here it is! Thanks for looking into it. I wouldn't be able to implement this in C, since you said it should belong in core, but the logic in the python implementation is probably a useful reference.

Cheers,
James
@purpleidea
Comment 1 GNOME Infrastructure Team 2018-01-11 09:53:51 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-builder/issues/53.