Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resharper indentation

How do I change the basic Resharper indentation options? I have noticed that Resharper's indentation settings differ from VS 2010's--VS uses four spaces for an indent, and it's hard to tell what Resharper uses--but the left margins on my code are jagged.

I'd like to reset Resharper to use the same settings as VS 2010, but I can't find the options.

Where can these be found?

like image 823
David Veeneman Avatar asked Sep 24 '10 21:09

David Veeneman


People also ask

How do I set rules in ReSharper?

Find the name of formatting rule that you want to tweak. You can look it up on the Code Editing | [Language] | Formatting Style page of ReSharper options ( Alt+R, O ) or alternatively, you can select a code block where the desired rule applies, press Alt+Enter , and choose Format selection | Configure.

How do I set default indentation in Intellij?

If you need to adjust indentation settings, in the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Editor | Code Style. On the appropriate language page, on the Tabs and Indents tab, specify the appropriate indents options and click OK.


2 Answers

Okay--I figured this one out: Resharper uses the Visual Studio tab settings when reformatting, so the inconsistency I am getting must have another source.

like image 160
David Veeneman Avatar answered Oct 18 '22 16:10

David Veeneman


Open ReSharper > Options > [Your language] > Formatting style > Other and try playing with options in sections called "Indentation" and "Other"

like image 32
Jura Gorohovsky Avatar answered Oct 18 '22 16:10

Jura Gorohovsky