C++ access modifier auto indentation in Visual Studio 2010 slowly driving me crazy - can it be changed?(Visual Studio 2010 中的 C++ 访问修饰符自动缩进慢慢让我发疯 - 可以更改吗?)
问题描述
在 Visual Studio 中编程 C++ 时,它坚持在访问修饰符上给我这些可怕的缩进 - 如果有人真的喜欢这种方式,我表示哀悼;)(开玩笑的伙计们!)
When programming C++ in Visual Studio, it insists on giving me these awful indentations on access modifiers - my condolences if anyone actually likes them this way ;) (a joke folks!)
public class MyClass
{
public:
MyClass();
~MyClass();
int wowAnInt();
}
不用说,我想要这个:
public class MyClass
{
public:
MyClass();
~MyClass();
int wowAnInt();
}
有什么方法可以使用任何东西(我有 ReSharper 和 Highlighter)或香草 VS 来实现这一点?
Is there any way to achieve this using anything (I've got ReSharper and Highlighter) or perhaps vanilla VS?
推荐答案
与内置的 Visual Studio 编辑器设置最接近的是将缩进模式从智能"更改为块"(工具 -> 选项-> 文本编辑器 -> C/C++ -> 制表符 -> 缩进).
The closest you can get with the built-in Visual Studio editor settings is to change the indenting mode from "Smart" to "Block" (Tools -> Options -> Text Editor -> C/C++ -> Tabs -> Indenting).
当你这样做时,你可以随意缩进任何你喜欢的东西,你只是失去了自动缩进".基本上,每当您按 [enter] 时,新行都会缩进与前一行相同数量的制表位/空格,并且不会自动重新格式化行以使它们对齐.
When you do this, you can indent anything however you like, you just lose the "automatic indenting." Basically, whenever you press [enter] the new line will be indented the same number of tab stops / spaces as the previous line and it won't automatically reformat lines to get them to line up.
这篇关于Visual Studio 2010 中的 C++ 访问修饰符自动缩进慢慢让我发疯 - 可以更改吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Visual Studio 2010 中的 C++ 访问修饰符自动缩进慢慢


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