Visual Studio 2015 - How to Preserve Indentation of Comments?

血红的双手。 提交于 2019-12-11 06:27:39

问题


Simple question. No answer given anywhere on the internet?

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.


回答1:


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

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

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



来源:https://stackoverflow.com/questions/45774439/visual-studio-2015-how-to-preserve-indentation-of-comments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!