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++ 访问修饰符自动缩进慢慢


- 近似搜索的工作原理 2021-01-01
- 如何对自定义类的向量使用std::find()? 2022-11-07
- 使用/clr 时出现 LNK2022 错误 2022-01-01
- C++ 协变模板 2021-01-01
- 从python回调到c++的选项 2022-11-16
- 静态初始化顺序失败 2022-01-01
- STL 中有 dereference_iterator 吗? 2022-01-01
- Stroustrup 的 Simple_window.h 2022-01-01
- 与 int by int 相比,为什么执行 float by float 矩阵乘法更快? 2021-01-01
- 一起使用 MPI 和 OpenCV 时出现分段错误 2022-01-01