Bad Indenting
For the past few versions, I keep hoping it gets fixed in a patch but never does, the indenting is kind of terrible. It will consistently fail to indent properly and goes to zero indent.
Pretty consistently, if I press enter twice, so to get a blank line, the second time the indent will go to zero indent and stay there. This happens at class level (1 indent) and method level (2 indent) (with file-scope namespace.)
After 1 enter press, it's ok, but after 2 or more, it goes to zero indent. Trying it out this happens 100% of the time. This is kind of terrible, I would almost never want zero indent in a method or class, and I will quite often want to add blank lines to organize code.
EDIT: ok another one, if I do a foreach or an if with no block, I don't get an indent.
foreach (var x in y)
|← cursor is here after enter, not indented
EDIT2: ok it's even worse than that. if my cursor is in virtual space in the correct position and I type a character, the virtual indent is erased and it goes to zero indent, even though it was correctly positioned. I think this is really what is happening with the two enter-key presses. Pressing a key in virtual space erases the virtual space. I can see that typing in virtual space at the end of a line does the same thing.
var something = GetSomething(); |<- cursor here in virtual space, type anything
var something = GetSomething();v|<- character ends up here and all the virtual space is erased
Same with an empty line (virtual indents not real ones):
|<- two indents, start typing...
v|<- virtual space is erased, what you typed ends up with zero indent
Please sign in to leave a comment.
I turned off “virtual indent on enter” as a workaround, but the “virtual space is deleted when you type” problem should still be fixed.
Hello Dave,
Thank you for contacting Rider support.
I reported this issue to our tracker where a developer will take a look: RIDER-127152 Typing in virtual space moves caret to the last existing symbol on the line
If this issue is critical to you, you might want to disable the patch engine (a newly implemented typing system delivered recently): press Shift+Shift→type and select Registry→Find and disable the rdclient.patch.engine.enabled.
However, it is not very recommended, as the legacy typing system is not anymore being tested. Should you encounter any other major issues, consider enabling the patch engine back.
If there is anything else I can assist you with, please tell me.
Have a nice day!