VS Code 中的多行注释 [英] Multiline comments in VS Code

查看:52
本文介绍了VS Code 中的多行注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想以这种方式注释掉我的代码

I want to comment out my code in this style

/**
 * This is
 * A multiline comment
 */

是否可以使用快捷方式?

Is it possible to do with a shortcut?

编辑 1:

https://github.com/Microsoft/vscode/issues/50301解决此问题,但它不适用于快捷方式.我希望能够选择一个代码块并以上面的样式将其注释掉

https://github.com/Microsoft/vscode/issues/50301 Address this issue, however it does not work with a shortcut. I want to be able to select a block of code and comment it out in the style above

推荐答案

这不是真正的解决方案,但您可以使用 制作 /* ... */ 样式的注释Shift + Option/Alt + A,然后使用垂直光标选择在每行开头插入一个空格和星号.

This isn't a real solution, but you can make the /* ... */ style comments with Shift + Option/Alt + A, and then use the vertical cursor select to insert a space and asterisk at the beginning of each line.

这篇关于VS Code 中的多行注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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