+1
Completed

Word navigation (ctrl+left/right): do not stop before and after every space

L Nguyen Huu 1 year ago updated by Hyper Sonic 3 weeks ago 4

It seems that in recent version of SmartGit, word navigation stops before and after every space.

This means that if you have a commit message "Added level 2" with the caret after 2, you need to press Ctrl+Left 3 times to go before "level".

I would rather have the caret skip any space before the next word in the pressed direction, as in other editors, so you press Ctrl+Left/Right as many times as there are words to skip.

In general, such editors also skip multiple spaces before a word. Although YMMV and you may want not to skip if there are 2+ spaces or more. Personally I'd just skip them and let the user go back with Ctrl+Left then Ctrl+Right, or reversely.

Generally speaking, if the user still wants to stop at the other boundary of the word, they can always play with Left/Right and Ctrl+Left/Right for an extra adjustment, it shouldn't take more than one extra input.

Yeah, noticed this change in behavior recently. No other editor I use behaves this way, and it makes it quite cumbersome for keyboard-oriented users. Wish the old behavior was restored, or there was a setting to change how ctrl+left/right behaves.

Completed

SmartGit 23.1 build 20112 will contain the low-level property 

styledtext.useOwnWordBoundaryDetection to disable our changes and use the system default.

Great, it works on Linux Ubuntu / Unity desktop to not stop at spaces, and probably other OSes since they use the same convention in other text editors!

But after more testing I understood why the new boundary detection was added: my system default stops at both hyphens and underscores, which is useful when editing subwords but very slow when navigating across a commit message filled with snake_case variable names.

So to get the best of both worlds, I'd either need:

- more options to decide atomically if hyphen - and underscore _ are boundaries

- commands with customisable shortcuts to navigate to previous/next subword (e.g. ctrl+alt+left, ctrl+alt+right - maybe not great with some window managers where it's mapped to snapping windows left/right, but alt+left/right was already taken - anyway, the defaults could be left empty as long as it's customisable)


That would be for another issue though, the space stop was what was taking me the most time. I'll open another issue for underscores.