I need to disable the CSS auto format in Visual Studio 11. It simply drives me nuts, it's horrible. I remember in version 2010 there was an option to disable auto formatting for any language, but now I can't find it anymore. Whenever I write a line and press enter it messes up my code.
The most appropriate formatting style is the Compact rules style, but it adds a space after the colon, and also it puts the opening bracket immediately after the selector (I align all brackets to a common column).
Every single IDE makes this incredibly difficult. Use vs-code default shortcut keys ctrl+k with ctrl+shift+s (windows) for saving without formatting. Alternatively press ctrl+shift+p and search for save without formatting.
press F1 or ctrl+shift+p and then enter beautify .. alt+shift+f did nothing, but typing beautify...
Here is how with SCSS. I belive it will be a similar process with CSS.
In my case I am using Asterisk AEL which is a custom script from Asterisk. Ael looks like this https://wiki.asterisk.org/wiki/display/AST/AEL+Loops
Anyways I first had to format .ael
file extension as SCSS by going to Options then searching for file extensions.
Because AEL code is not SCSS I then searched for SCSS on options and disabled mostly everything as:
Now visual studio will not mark errors and will still format the code.
It doesn't look like there's an option. I checked through the registry settings being accessed and couldn't see anything there for it either.
I'd suggest you raise an issue on the connect site or add an entry to the Visual Studio User Voice site.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With