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

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

问题描述

VS2013添加了自动格式化C ++。我个人对自动格式化的意见是,它最终对开发人员有害,但我必须接受不是每个人都同意。我的错误是,我似乎无法完全禁用自动格式化。我已取消选中工具 - >文本编辑器 - > C / C ++ - >格式化 - >常规下的每个复选框,但当我键入:

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.

PS 。我不反对VS可以格式化代码,但我想手动调用

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

推荐答案

您可以关闭自动C ++代码格式化转到工具菜单中的选项对话框,选择文本编辑器 - > C / C ++ - >格式设置 - >常规所有的盒子。当所有自动格式设置都关闭时,您仍然可以手动设置格式。

You can turn off automatic C++ code formatting by going to the Options dialog from the Tools menu, selecting the Text Editor -> C/C++ -> Formatting -> General 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天全站免登陆