Visual studio 2010 + resharper bracket indentation problem
I'm using VS 2010 + resharper, and i'm tired reformatting bracket indentation in code as i want it. As example if i have code like:
operators.Keys
.ToList()
.ForEach(k => filters
.AddRange(CustomHtmlHelpers.GetIdAndValueListByPrefix(queryString, k)
.Select(t => new QueryFilter()
{
Operation = operators[k],
PropertyName = t.Item1,
Value = t.Item2
})))
And if i put
;in the end resharper (or VS) 'fixes' bracket indentation so code becomes like:
operators.Keys
.ToList()
.ForEach(k => filters
.AddRange(CustomHtmlHelpers.GetIdAndValueListByPrefix(queryString, k)
.Select(t => new QueryFilter()
{
Operation = operators[k],
PropertyName = t.Item1,
Value = t.Item2
})));
Same happens if i use resharper's code cleanup. I probably could turn off automatic code reformatting on
;but i need it in other situations. I tried changing code formating options both in resharper and VS setting but never got indentation as i want it.
How could i configure resharper so that it would not do more than one tab formating?
p.s. i asked this question at http://stackoverflow.com/questions/6224267/visual-studio-2010-resharper-bracket-indentation-problem also.
Please sign in to leave a comment.
Hello Andrej,
First of all try turning off 'Indent anonymous method body' option under
ReSharper | Options | Languages | C# | Code Style | Other. Also, at the moment
ReSharper doesn't properly support formatting fluent interfaces, so you're
welcome to vote for the following request: http://youtrack.jetbrains.net/issue/RSRP-88220.
Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"