Search code examples
visual-studio-2010resharperautoformatting

Flag a region to not be affected by the auto formatting rules


I'm looking for a way to keep a region of my to code have a certain number of tab indents. The tabs are representing a relation to the field above it.

I.e.

public string Foo1
    pubic string F1Bar1
public string Foo2
public string Foo3
    public string F3Bar1
    public string F3Bar2
        public string F3B2Foobar1
public string Foo4

Running an auto format would of course align all these string, Is there a way to flag this part of code to be neglected by the auto formatter. keeping the indents while the rest of the code does get formatted?

(Resharper is Available for me)


Solution

  • No way to do it in ReSharper 7.0 or earlier. But you can vote for this feature here http://youtrack.jetbrains.com/issue/RSRP-9997 .