I wish next/previous word was a little more efficient
In 20+ years of coding, I've always been a big user of previous/next word functionality. This is especially with OOP where you find yourself with a long chain of class members and submembers. I feel like it's very inefficient in Rider. Say I have the following line of code:
hoverObject.GetComponent<Renderer>().material = savedMaterials[hoverObject.GetComponent<IInteractableControl>()];
My cursor is at the beginning and I want to get to savedMaterials. I have to press the shortcut for Next Word 11 times. Then I have to press the right arrow, because it puts the arrow at the END of words (something that is the opposite of pretty much every editor out there, to my memory).
I used Delphi for a number of years, and I really enjoyed its implementation of next/prev. It went to the beginning of the next word. Operators, periods, and other symobls are not words. That means the above operation would take 5 keystrokes. I found this was where I wanted to be the vast majority of times, and it was better to do that and have to use the arrow to back up a bit if I wanted the surrounding parens or previous dot or whatever.
To not rock the boat, you could add "Move caret to next word start" or something to differentiate. Much like you also have the one for CamelHumps settings.
Please sign in to leave a comment.
Hi @...!
Thank you for your feedback.
We have a corresponding feature request in our tracker, please, follow it and vote: IDEA-68325.
For now, it is possible to tune behaviour of the default actions in `File | Settings | Editor | General | Caret Movement`.
I hope this helps! Should you have any other questions, let us know. Have a great day!
Thank you for the response. Yes, that setting does help somewhat. However, it still stops on all kinds of non-words, mainly symbols like =, parens, braces, etc. This can be especially egregious when you have somethi8ng like obj.GetComponent<MeshRenderer>().material etc. It adds six more stops that are each just one character. It's a very slow way to navigate.
The issue you linked seems on the same general topic, but is asking for a different behavior. It wants to stop at the beginning sometimes and end at other times. I just want it to consistently go to the beginning. I find this consistent behavior much easier to use.
Thank you for the details!
This is a general issue for changing this behaviour. You can create a separate one if you think it's completely different. Use the "new issue" button in YouTrack for this.