How do I turn off auto-formatting in VS2013 for C+

2019-01-23 00:54发布

VS2013 has added auto-formatting for C++. My personal opinion on auto-formatting is that it's ultimately harmful for developers but I have to accept not everyone agrees. What bugs me is that I can't seem to disable auto-formatting completely. I have unchecked every checkbox under Tools->Text Editor->C/C++->Formatting->General yet when I type:

void f ()

VS2013 replaces this with

void f()

That's not the code-standard in this specific project which means I have to go back and insert a space. There are other examples where I have to fight against VS.

I don't want to change the spacing settings because

  1. I work in multiple projects with different code standards
  2. I don't believe in auto-formatting so I just want it to get out of my way

I just want VS to not modify my code automatically.

PS. I am not against that VS can format code but I want to invoke that manually

7条回答
一夜七次
2楼-- · 2019-01-23 01:42

To turn off automatic brace completion, go to:

Tools > Options > Text Editor > All Languages > General > Automatic brace completion

...then uncheck "Automatic brace completion".

查看更多
登录 后发表回答