visual-studio - 在 Visual Studio 2005 中禁用自动缩进某些项目?

标签 visual-studio visual-studio-2005 automation autoformatting

我不介意 VS2005 自动缩进(或自动格式化)我的 C++ 代码的大部分方式,但我不希望它自动缩进某些项目。例如#define 语句。它会把它们带到屏幕的左侧,不管我输入它们的范围有多深。这真的很烦人。

除了完全禁用自动缩进/格式之外,还有什么方法可以改变这种行为吗?

最佳答案

如果您只想更改几个示例(并且不介意在整个部分或文件重新格式化时重新更正缩进),您可以将缩进更改为您想要的,然后下线.

格式化缩进将返回,但您可以撤消 (Ctrl+Z) 并且您想要的缩进将返回。 (请注意,我实际上并没有在 C++ 编辑器中对此进行测试。)

只要您不介意在每次编辑该行时“更正”缩进(以及其他时候重新格式化整个部分),这允许您交替缩进一些行。

关于visual-studio - 在 Visual Studio 2005 中禁用自动缩进某些项目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2490055/

相关文章:

c - gethostbyname win32错误

visual-studio - 我可以在 F# 中创建跨平台 Xamarin Forms 应用程序吗?

c++ - 在 Visual Studio 项目中链接 Tensorflow

java - JNI : How to pass "unsigned char* " from C++ to java

visual-studio-2008 - 在TFS下重命名VS.net中包含的项目文件夹

google-chrome - “cannot get automation extension” chrome 版本错误 : 57. 0.2987.98

com - 如何使用 ITypeInfo 指针来获取类型的名称?

exception-handling - http CreateErrorResponse 可以返回复杂的对象内容吗?

c++ - Visual Studio Community 2015 不显示输出

visual-studio - F# docker 应用程序 : A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file. ...?