I suggest you ...

Allow turning the CSS auto formatting off completly.

There doesn't appear to be a way to turn off the auto formatting in CSS files. I'm sure that in VS2010 my most hit, non-alphanumeric key was the semi-colon, in VS2012 it's backspace 2012 tends to put in spaces and line breaks automatically. I prefer to wrtie my CSS files to be ultra-condensed to begin with. It would be great if there was a "disable auto formatting/auto completion check box for CSS files.

105 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Anonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    16 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • damascus90damascus90 commented  ·   ·  Flag as inappropriate

        ** regarding last post, i forgot to clarify that this seems to be a problem with inline css - despite my changes to stop HTML formatting, anything inside a <style> tag is still auto-formatted on paste operations (try pasting .classname to line before style rule and see

        I couldnt say too much about .css files themselves, no trouble myself of late but im mostly coding inline so i can see changes easily as i load view with ajax

      • damascus90damascus90 commented  ·   ·  Flag as inappropriate

        @Admin -

        "Thanks for the feedback. This option was added to Visual Studio 2013"

        no, it hasnt

        like @Aron has stated - it is an INCREADIBLY frustrating bug that you cannot even just simply ctrl-z the formatting step, like i am forced to do for many other flawed 'auto-format' actions when editing certain other languages.

        Changing to 'Compact' braces and toggling other options doesnt seem to do a thing.

        It was one thing when my cshtml page was quite literally broken in a dozen places when i autoformatted a bunch of files then saved before checking every single tab - that i could stop in future by combing for autoformat options and disabling all i saw

        But this is a BUG that STILL exists, despite constant calls and a supposed fix implemented 12 months ago.

        I know how to write CSS, stop causing me headaches and screwing up my style sheets every time i paste even a single character

      • Aron BoyetteAron Boyette commented  ·   ·  Flag as inappropriate

        Despite Mads Kristensen's bold claim that this was implemented, it still does not work. In Visual Studio 2013, under TOOLS - Options, Text Editor / CSS / Advanced, I have Formatting / Automatic formatting = Off. Although nothing is repositioned as I type, whenever I paste, it still repositions. Its VERY aggravating.

        By the way, I hope everyone here appreciates the amazing amount of restraint I'm showing in the post. My level of dissatisfaction with Microsoft at this point is making me want to start looking for a Java position.

      • Anonymous commented  ·   ·  Flag as inappropriate

        I can't believe I paid for this ****!! If I want to drop a button into the form, why does that mean I want to make my paragraph look like my heading? This it's actually easier to program all this stuff from notepad. That's a better editor!

      • Anonymous commented  ·   ·  Flag as inappropriate

        I find this irritating as well, but there is a workaround. In case anyone comes across this later like I did...you can simply type the closing brace and then hit Undo (Ctrl+Z) to undo the auto formatting. I do it every day in VS 2012 when working with CSS/LESS files.

      • AnonymousAnonymous commented  ·   ·  Flag as inappropriate

        Please, please, please provide a "None" option. C'mon, that must be one "if" statement in code somewhere to skip over auto-formatting when the closing brace "}" is typed.

      • Anonymous commented  ·   ·  Flag as inappropriate

        Yes, please, a simple "None" option under TOOLS->OPTIONS->Text Editor->CSS->Formatting would be logical. Choosing "Compact Rules" and unchecking "Hierarchical indentation" does NOT solve the problem. It just formats it differently. It still formats it when I type a closing brace. The only (really lame) workaround I found is to actually keep a closing curly brace copied so that I can paste it in instead of typing it.

      • Anonymous commented  ·   ·  Flag as inappropriate

        Follow TOOLS->OPTIONS->Text Editor->CSS->Formatting
        Choose "Compact Rules" and uncheck "Hiearerchical indentation"

      • Tobias SchoderTobias Schoder commented  ·   ·  Flag as inappropriate

        If you use Web Essentials just set "Enable Speed Typing" to false and everything will work as expected.

      • Ryan WilliamsRyan Williams commented  ·   ·  Flag as inappropriate

        Incredibly irritating. Can't believe an IDE like this doesn't allow the auto-formatting to be disabled. A simple 'None' in the 'Formatting' text editor options would be adequate.

      • EhsanEhsan commented  ·   ·  Flag as inappropriate

        This feature walking through my nerves!
        Please just allow turn this off :(

      • ++ commented  ·   ·  Flag as inappropriate

        The way I see it is this; How dare Visual Studio force me to format my CSS its way. I've been writing CSS for 10+ years and now Visual Studio has suddenly ruled that my formatting is incorrect and I have to edit EVERY SINGLE LINE OF CSS I WRITE. I dread typing the closing } as it triggers the raping of my code. It's very annoying I can't believe this kind of stuff gets past testing.

      • ScottScott commented  ·   ·  Flag as inappropriate

        It's driving me crazy!! When I'm writing a big chunk of CSS I write it in another app and copy it over.

      • sonixsonix commented  ·   ·  Flag as inappropriate

        Can't believe there is no way to turn this off?!?
        Yes please implement this.

      Feedback and Knowledge Base