Looking for a feature like "Force Scope-Appropriate Indentation On Empty Lines"
Hi, I'm using JetBrains Rider for Unity development.
There is a 10-years old post here that expresses my desire perfectly:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206938865-Keeping-whitespace-tabs-in-blank-lines-based-on-indentation-
"Ideally, it would be a checkbox in settings->code style->blank lines called something like "force indentation whitespace" so that I could simply reformat all my files..."
He couldn't find the feature he wanted. It's now 2020, and I would like this feature, so I figure it's worth asking about.
The reason I would like it is because I have to constantly fix indentation first, before adding any new code or comment, on empty lines. This should be automated by Rider by having empty lines match the indentation of their scope. Ideally, files would save to disk this way too, but whether such whitespace saves with the file is a secondary concern.
Thanks.
Please sign in to leave a comment.
File | Settings | Editor | Code Style | Java (or any supported language): Keep indents on empty lines.
See also a request to make it global for all languages: https://youtrack.jetbrains.com/issue/IDEA-194442 .
Please note that Rider specific support is available on a different resource: https://rider-support.jetbrains.com/hc/en-us .
Serge Baranov
Apologies if this is the wrong place to ask about Rider. It wasn't clear to me when I hit New Post from the UI of that page that Rider wasn't an option. I was under the impression that Rider was a subset of the IntelliJ suite.
With regards to the functionality, what is the status of being able to do this for C# in Rider per my original question? I looked for this option for my language in Rider and didn't find it.
Is it missing? Maybe that's why you mentioned the link 'request to make it global for all languages'. From your wording, it is not clear to me.
Thanks for your help.
If it's not available for C#, you should submit/search for a request at https://youtrack.jetbrains.com/issues/RIDER or contact Rider support team for help at https://rider-support.jetbrains.com/hc/en-us .
Thanks Serge Baranov I will do that. Consider this thread closed.