Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The comment slash // is indented too left (Rider)

Tags:

c#

rider

I'm using Rider, and when I comment out a line using the keymap "Comment/uncomment with Line Comment", the slash // is indented too far left and not where the actual word was appearing. Perhaps a picture can illustrate it better.enter image description here

I'd like the slash to be where the line started originally, like when you use vscode or sublimetext:

enter image description here

Sorry for the weird topic, but it has been nagging me for quite a while now and can't stop thinking about it while typing (:D). I couldn't find the setting that would change this.

like image 994
jubibanna Avatar asked Dec 23 '22 01:12

jubibanna


1 Answers

Check here for how to change it.
https://www.jetbrains.com/help/rider/Coding_Assistance__Comment_Uncomment_Code.html#commenting-and-uncommenting-with-line-comments

According to the Don't indent comments started at first column option, the comment will be added with or without the indent. You can configure this option for different languages separately, for example, for C# it is on the Editor | Code Style | C# | Tabs, Indents, Alignment page of JetBrains Rider settings Ctrl+Alt+S.

like image 195
Jorge Ribeiro Avatar answered Jan 09 '23 05:01

Jorge Ribeiro