我找不到在Visual Studio code中注释和取消注释多行代码的方法。
是否可以在Visual Studio Code中使用一些快捷方式注释和取消注释多行?如果有,怎么做?
我找不到在Visual Studio code中注释和取消注释多行代码的方法。
是否可以在Visual Studio Code中使用一些快捷方式注释和取消注释多行?如果有,怎么做?
当前回答
在Windows中,注释多个的快捷键是shift+alt+A。
其他回答
在mac上执行:CMD + Shift + 7
您可以在官方文档中看到所有可用的键绑定。
这是osx的相关位:
Key Command
⌘K ⌘C Add Line Comment
⌘K ⌘U Remove Line Comment
⌘/ Toggle Line Comment
⇧⌥A Toggle Block Comment
您需要首先选择想要注释的行,然后执行上述快捷方式,即在osx上执行⌘/ Ctrl/在Windows上。
CTRL + /注释/取消注释多行代码
Ctrl+k+u的大写字母后面
Ctrl +k+l表示小写字母
对于Python VSCode中的多行注释,你所要做的只是:
Ctrl +
在Windows中
选择要注释的行。 然后按“Ctrl + /”