Visual Studio Adaptive Formatting | Synergex
Phone800.366.3472 SupportGet Support DocumentationDocumentation Resource CenterResource Center
search
close
Open Menu

Synergex Blog


Visual Studio Adaptive Formatting

By Steve Ives, Posted on January 24, 2020 at 4:32 pm

Steve Ives

In Microsoft Visual Studio version 16.4 a new feature was, I was going to say introduced, but snuck in might be more appropriate way of describing things. There was no mention of the new feature in any release notes that we can find, and an internet search for the name of the new feature currently returns no useful matches!

The feature is called Adaptive Formatting and apparently what it does is allows code editor windows to “heuristically determine if the current file should use tabs or spaces for indentation”. Previously this behavior was determined by a language specific setting, and those settings are still present, but if Adaptive Formatting is enabled (which it is by default by the way), then it wins!

So if your code is indented with tabs, and suddenly Visual Studio decides to start using spaces instead (or vice-versa) then it’s probably Adaptive Formatting getting it wrong! Thankfully this new feature can be disabled by going into Tools > Options > Text Editor > Advanced and un-checking the Use adaptive formatting option.

Happy coding everyone!


One response to “Visual Studio Adaptive Formatting”

  1. Avatar Scott Rodriguez says:

    Additional information from a MS employee on Adaptive Formatting at the following link, see Post #5.

    https://developercommunity.visualstudio.com/idea/1132644/the-adaptive-formatting-setting-is-not-documented.html

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Don't miss a post!

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Recent Posts Categories Tag Cloud Archives