Visual Studio 2015 - 如何保留评论缩进? [英] Visual Studio 2015 - How to Preserve Indentation of Comments?

查看:192
本文介绍了Visual Studio 2015 - 如何保留评论缩进?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简单的问题。互联网上的任何地方都没有回答?

Simple question. No answer given anywhere on the internet?

我在VS2015社区的C ++ / C#中编程。当我注释掉代码然后关闭ide并重新打开它时,这个注释代码会丢失缩进。我如何强制VS保留缩进?它不应该对评论的代码/文本做任何事情。在此先感谢。

I program in C++ / C# in VS2015 community. When i comment out code and then close the ide and reopen it, this commented code loses indentation. How do i force VS to preserve indentation? It shouldn't be doing anything to the code / text that is commented. Thanks in advance.

推荐答案

在VS 2017(C ++)中,有一个复选框。

In VS 2017 (C++) there is a checkbox for this.

工具|选项|文字编辑器| C / C ++ |格式化|缩进|保留评论缩进

Tools | Options | Text Editor | C/C++ | Formatting | Indentation | Preserve indentation of comments

取消选中它修复烦人的评论自动格式化。也许VS 2015中存在相同的选项。

Unchecking it fixed annoying comment auto-formatting. Maybe the same option exists in VS 2015.

这篇关于Visual Studio 2015 - 如何保留评论缩进?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆