How to change default code indentation/alignment in files?
for C# files I have something like this (no space between line numbers and code)
In another file I have the following (annoying) space in between the line numbers and the code. How can I remove this?
Please sign in to leave a comment.
What kind of file is it? Generally, code style settings for a language is in `File | Settings | Editor | Code Style`. You can apply formatting rules as described here: https://www.jetbrains.com/help/rider/Enforcing_Code_Formatting_Rules.html
This is a .cmd file, the same happens with .ps1 and .sh files and they don't show up in `File | Settings | Editor | Code Style`.
Also just to disperse any confusion about the 'indentation' it's not the kind of indentation that I can remove, it's like the 'gutter' or whatever it's called (this ui component is part of the line numbers, where if I right click on it there are different context options compared to the code).
Are you using Distraction free mode? At the moment, it behaves differently on C# and .cmd and other types of files.
Workaround
Settings | Editor | Code StyleSee https://youtrack.jetbrains.com/issue/IDEA-145837
Hope this helps!
That fixed it thank you :)
I thought Hard Wrap would mean if text is overflowing it would try to put it on the next line.
Yep, that's true. Hard wrap is for putting code on the next line. However, this is also a workaround to lower the margin in distraction free mode :)