问题
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