visual studio – How to disable VS2022’s auto-format of whitespace in function parameters?


When I type the following into a .cpp document:

please(let, me, keep, my, spaces);

Visual Studio will reformat the text into:

please(let,me,keep,my,spaces);

I’ve gone into Tools -> Options -> Text Editor -> C/C++ -> Code Style -> Formatting -> Spacing and disabled all the options present. All of the radios are set to “Don’t Change…” or “Leave Unchanged”

I’ve also gone into Tools -> Options -> Text Editor -> C/C++ -> Code Style -> Formatting -> General and disabled ClangFormat support.

Is there an option I’m missing..? I’ve poured through the other formatting options and I’m not seeing anything…

Leave a Reply

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