How to make cursor start from formatted position in new line?


The title may be a bit confusing but here is what I want to do: When I click on an empty line in Rider, the cursor starts at the beginning of the line. However if I go to the previous line and press ENTER, it automatically adjusts the cursor position depending on the position of previous line. 

How do I make this behaviour default when I click on a new line? This is the default behaviour in Visual studio and I miss this feature since I recently switched to using Rider.


Hi Selman Genç

Please check that `File | Settings | Editor | General => Virtual Space | Allow caret placement After the end of line` is enabled. 

I hope this helps! Should you have any questions, let me know. 


I'm having the same issue and 'Allow caret placement After the end of line' does not give the same behavior. In Visual Studio, when I click a blank line the cursor is indented where I would expect for that code block.

In Rider, the default is to put the cursor at the beginning of the line. With the virtual space feature enabled, the cursor is placed wherever I clicked, not at the expected indent.

Does the difference make sense? Is there any way to get the same behavior in Rider? It seems like a small thing, but for some reason I find it so inconvenient that it's the one thing preventing me from switching to Rider full time.


Hi Rthomasv3

Could we check your case, please? 

For this, enable `File | Settings | Editor | General | Appearance => Show whitespaces` and attach a screenshot or a screencast where empty lines as in described case are visible. 

Thank you in advance!  


Hi Alexandra Guk,

I have the same expectations as Rthomasv3:

If I have an empty line inside existing method I expect that when I press on this line (on any position righter than code block starts) my cursor goes to the same position as other lines of code start in this code block, like below:

And what Rthomasv3 wrote - in Visual Studio this is a default feature. Even if you put the cursor to the beginning of the line if you press on keyboard 'End' key, your cursor goes to correct position. But in Rider by default no additional spaces are added: 

and you have to either press couple of times `Tab` button until your cursor reach correct position, or you have to press Backspace and press enter, so all needed additional spaces are added and your cursor at the correct position:

And the feature which you described is absolutely not what I expect.


Dmitriy Bobrovskiy

Indeed, Rider works differently then Visual Studio in this case. It sounds really annoying, but, surprisingly, there are no much votes in the corresponding feature request: Please feel free to upvote it. 


Please sign in to leave a comment.