如何在 Visual Studio Code 中注释多行? [英] How to comment multiple lines in Visual Studio Code?

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

问题描述

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

I cannot find a way to comment and uncomment multiple lines of code in Visual Studio Code.

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

Is it possible to comment and uncomment multiple lines in Visual Studio Code using some shortcut? If yes, how to do it?

推荐答案

Shift+Alt+A

在这里您可以找到所有键盘快捷键.

Here you can find all the keyboard shortcuts.

所有 VSCode 快捷键

PS:我更喜欢 Ctrl+Shift+/ 来切换块注释,因为 Ctrl+/ 是切换行注释的快捷方式,因此自然更容易记住.为此,只需单击屏幕左下方的设置图标,然后单击键盘快捷键"并找到切换块...".然后点击并输入您想要的组合.

PS: I prefer Ctrl+Shift+/ for toggling block comments because Ctrl+/ is shortcut for toggling line comments so it's naturally easier to remember. To do so, just click on the settings icon in the bottom left of the screen and click 'Keyboard Shortcuts' and find "toggle block...". Then click and enter your desired combination.

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

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