2

这是一个生活质量问题,可能非常简单,但是,我似乎找不到答案。

如果您开始阻止评论...

/*
my code here
string url = "lorumipsum....*/...lorumipsum"; <---this "*/" is closing the comment early
more code
*/

它被字符串中的任何“*/”关闭。有没有办法摆脱这种情况?还是我只是手动“//”该行并阻止评论其余部分?

4

2 回答 2

4

您可以从工具栏中选择所有文本和评论(快捷方式:Ctrl++ KU。它将//像这样添加到所有选定行的前面。

///*
//my code here
//string url = "lorumipsum....*/...lorumipsum"; <---this "*/" is closing the         comment early
//more code
//*/

无需手动执行此操作。

工具栏图片
在此处输入图像描述

于 2015-08-03T13:50:17.913 回答
3

或者,您可以按住Alt- 键,单击并绘制所有要注释掉的行,然后//在多行编辑模式中在它们之前键入。

于 2015-08-03T13:52:12.513 回答