Trying to get my css / C# functions to look like this:
body {
color:#222;
}
instead of this:
body
{
color:#222;
}
when I auto-format the code.
Trying to get my css / C# functions to look like this:
body {
color:#222;
}
instead of this:
body
{
color:#222;
}
when I auto-format the code.
Tools -> Options -> Text Editor -> C# -> Formatting -> New Lines -> New Line Options for braces -> Uncheck all boxes.
Tools menu -> Options ...
Then go to Text Editor -> C# -> Fromatting -> new lines and there check when you want new lines with brackets
for css:
almost the same, but less options
Actually, @ajmastrean, you are wrong, they are not.
The official MS guidelines tells you to have the curly brace on the same line as the method/property/class and many other things which are not enforced in Visual Studio.
You can change all these auto-text settings under:
Tools -> Options -> Text Editor -> [The language you want to change]
The one that gets me is when Visual Studio takes upon itself as I write the code to change the formatting. I now it'll be a setting somewhere, but I feel as if I'm wrestling with the IDE. I shouldn't really single out Visual Studio, all autoformatting IDEs do it to a certain extent.