我找不到在Visual Studio code中注释和取消注释多行代码的方法。

是否可以在Visual Studio Code中使用一些快捷方式注释和取消注释多行?如果有,怎么做?


当前回答

选择所有需要注释的行 CTRL + /

其他回答

MacOS上VSCode的键盘快捷键:https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf

我使用⌘/来切换注释。

CTRL + shift + a 红帽公司的价格是美分

选择项 然后按CTRL + SHIFT +

在Windows 10中,你可以使用CTRL +}对任何一行或代码块进行注释/取消注释。

在Windows中,注释多个的快捷键是shift+alt+A。

在windows中,您需要按ctrl + /在mac中,您可以使用⌘+ /进行多个注释

// public function index()
// {
//     $badgeIcon = BadgeIcon::all();
//     return $this->showAll($badgeIcon);
// }

然后如果你想取消注释,那么再次选择这些行,然后再次按ctrl + /(在windows中)⌘+ /(在mac中)。