Namespace indentation in Visual Studio with C# -
visual studio indents code within namespace. can avoided when disabling indentation globally, not want. in other cases, indentation fine, don't fact code 1 level - makes ugly me.
namespace x { public class {} }
i prefer this:
namespace x { public class { } }
in c++, there's nice workaround explained here:
namespace x {; // ; after opening brace makes visual studio not indent class below. class {}; }
but in c#, namespace cannot directly contain fields doesn't work.
how can visual studio stop indenting namespaces without disabling indentation globally?
update visual studio 2013 behavior c++ has changed
tools->options->c/c++->formatting->indentation: [ ] indent namespace contents
enables preferred formatting, while {; trick doesn't work anymore. no change c# find.
- text editor → c# → tabs → indenting — set "block"
- text editor → c# → formatting → general — turn off every checkbox saying "automatically format..."
Comments
Post a Comment