我找不到在Visual Studio code中注释和取消注释多行代码的方法。
是否可以在Visual Studio Code中使用一些快捷方式注释和取消注释多行?如果有,怎么做?
我找不到在Visual Studio code中注释和取消注释多行代码的方法。
是否可以在Visual Studio Code中使用一些快捷方式注释和取消注释多行?如果有,怎么做?
当前回答
您可以在官方文档中看到所有可用的键绑定。
这是osx的相关位:
Key Command
⌘K ⌘C Add Line Comment
⌘K ⌘U Remove Line Comment
⌘/ Toggle Line Comment
⇧⌥A Toggle Block Comment
您需要首先选择想要注释的行,然后执行上述快捷方式,即在osx上执行⌘/ Ctrl/在Windows上。
其他回答
选择所有需要注释的行 CTRL + /
对可视代码使用注释多行
shift + alt + a
注释单行使用
ctrl +
在mac上执行:CMD + Shift + 7
Windows 10,意大利键盘,VSC 1.19.1:
选择你想要评论的行并按“Ctrl + ù”
在Windows中,注释多个的快捷键是shift+alt+A。