0

Subword navigation shortcuts (e.g. Ctrl+Alt+Left/Right)

Hyper Sonic 8 months ago 0

As an alternative to Specific word boundary settings for hyphen & underscore detection (https://smartgit.userecho.com/communities/1/topics/1685-specific-word-boundary-settings-for-hyphen-underscore-detection, if link doesn't review it means it's still being reviewed by moderation), we could add commands with customisable shortcuts to navigate per subword (separated by hyphen/underscore *even* if current word boundary setting skips them).

Default shortcuts could be Ctrl+Alt+Left/Right (may conflict with some desktops), or empty. Personally I'd use Alt+Left/Right but I'll have to remove existing competing shortcuts (in fact it's just Alt+Left that is mapped to reveal previous commit, others like File Compare: Take Left/Right Block are more contextual so it's ok).

In this case the best combination would be to set all boundary settings to skip hyphens and underscores (either via options as suggested in the thread linked above, or hardcoded to always skip if everyone agrees), and so users can navigate full words with Ctrl+Left/Right and then more precisely over subwords with the new commands/shortcuts.

And of course both suggestions are compatible: we could define behavior for Ctrl+Left/Right to the most useful ones for us, and use sub-word navigation when we need to.