如何在 VS2013 for C++ 中关闭自动格式化? [英] How do I turn off auto-formatting in VS2013 for C++?

查看:42
本文介绍了如何在 VS2013 for C++ 中关闭自动格式化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VS2013 为 C++ 添加了自动格式化.我个人对自动格式化的看法是它最终对开发人员有害,但我必须接受并非所有人都同意.我的问题是我似乎无法完全禁用自动格式化.当我输入时,我已经取消选中 Tools->Text Editor->C/C++->Formatting->General 下的每个复选框:

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 将其替换为

VS2013 replaces this with

void f()

这不是这个特定项目中的代码标准,这意味着我必须返回并插入一个空格.还有其他一些例子,我必须与 VS 作斗争.

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. 我在多个具有不同代码标准的项目中工作
  2. 我不相信自动格式化,所以我只是想让它不受我的影响

我只是想让 VS 不自动修改我的代码.

I just want VS to not modify my code automatically.

附注.我不反对 VS 可以格式化代码,但我想手动调用它

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

推荐答案

您可以通过从 工具 转到选项 对话框来关闭自动 C/C++/C# 代码格式设置strong> 菜单,选择 Text EditorC/C++/C#FormattingGeneral 页面,并取消选中那里的所有框.关闭所有自动格式化设置后,您仍然可以手动格式化.

You can turn off automatic C / C++ /C# code formatting by going to the Options dialog from the Tools menu, selecting the Text EditorC / C++ / C#FormattingGeneral page, and unchecking all the boxes there. You'll still be able to manually format when all of the auto-formatting settings are turned off.

这篇关于如何在 VS2013 for C++ 中关闭自动格式化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆