Builder should support "smarter spaces"
Submitted by James
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.
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.
I actually implemented all this in python back in 2013. I don't know if my implementation was optimal, but it definitely worked great :)
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