Caret placement after code completion
Answered
I love Rider's syntax configuration options. I've set it up to match my style so that a function call looks like this, with a space buffer:
print( "Hello world." );
When I start to type 'print' and complete the line with a tab, it places the caret right where the asterisk is located:
print( * );
That's great. But when I type 'print(' Rider completes the rest like so:
print(* );
The double space after the caret means I have to hit the right arrow-key to move my cursor, interrupting my normal typing flow. Can I configure Rider to automatically place the caret in the center of the spaces? If not, is that a feature that could be added please?
Please sign in to leave a comment.
Thanks for replying, Alexandra! I've attached my settings. Here's a video I recorded showing the issue with captured keystrokes, as well.
I'm using C# / Unity.
Settings
Video
It's Rider 2019.1.3 on Mac OS 10.14.5.
Unchecking that box does eliminate the spaces within a method call. I'd like to keep the extra spaces but have the caret always placed between them when a method is autocompleted. If that's not possible, which now seems likely, I'll just tell Rider not to autoformat this aspect of my code and insert the spaces myself.
Sure. The problem is the same for me in the latest EAP. Here's a video of me trying it and also the EAP exported settings:
Video
Settings
Thanks for sticking with me, Alexandra!