使用VisualStudio2019时,当我在C++文件中的块注释中单击enter时,它会添加一个前导*。我已经为C#在How do I stop Visual Studio from automatically inserting asterisk during a block comment?上找到了解决这个问题的方法,但是C++不存在相同的选项,而更改C#选项并不会禁用C++的特性。这种情况在2017中不会发生。
所以当我有:
/*<cursor here>
*/我按了回车,我想让它看起来像:
/*
<cursor here>
*/但我却得到了
/*
* <cursor here>
*/在某个地方是否有禁用此行为的选项,或者另一种方法?
发布于 2021-04-16 21:19:08
在“Tools\Options
comment style
Text Editor/C/C++树中选择底部节点(当前名为General).
[x] Insert existing comment style at the start of new lines when writing comments。取消检查。
好了。
发布于 2021-04-29 09:34:19
根据链接:https://developercommunity2.visualstudio.com/t/disable-new-extend-multiline-comments-in/1185751
这似乎是一个问题,这个问题是在16.8中解决的。我建议您可以安装来自https://visualstudio.microsoft.com/downloads/的最新版本。或者你可以更新你的视觉工作室。
https://stackoverflow.com/questions/67131867
复制相似问题