How do I turn off auto-formatting in VS2013 for C++?(如何在 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
- 我在多个具有不同代码标准的项目中工作
- 我不相信自动格式化,所以我只是想让它不受我的影响
我只是想让 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 Editor → C/C++/C# → Formatting → General 页面,并取消选中那里的所有框.关闭所有自动格式化设置后,您仍然可以手动格式化.
You can turn off automatic C / C++ /C# code formatting by going to the Options dialog from the Tools menu, selecting the Text Editor → C / 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++ 中关闭自动格式化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 VS2013 for C++ 中关闭自动格式化?


基础教程推荐
- 为什么语句不能出现在命名空间范围内? 2021-01-01
- 如何“在 Finder 中显示"或“在资源管理器中显 2021-01-01
- 从 std::cin 读取密码 2021-01-01
- 使用从字符串中提取的参数调用函数 2022-01-01
- 在 C++ 中循环遍历所有 Lua 全局变量 2021-01-01
- 为 C/C++ 中的项目的 makefile 生成依赖项 2022-01-01
- 如何使图像调整大小以在 Qt 中缩放? 2021-01-01
- 管理共享内存应该分配多少内存?(助推) 2022-12-07
- Windows Media Foundation 录制音频 2021-01-01
- 如何在不破坏 vtbl 的情况下做相当于 memset(this, ...) 的操作? 2022-01-01