How to comment the code in VSCode editor
Categorized as VSCode
MacOS users
The easiest way to add or remove selection comment would be ⌘/
, but you can also use these keyboard shortcuts:
⌘K ⌘C
Add line comment⌘K ⌘U
Remove line comment⌘/
Toggle line comment⇧⌥A
Toggle block comment
See the full list of keyboard commands for VSCode on MacOS.
Windows users
Ctrl+K Ctrl+C
Add line commentCtrl+K Ctrl+U
Remove line commentCtrl+/
Toggle line commentShift+Alt+A
Toggle block comment
See the full list of keyboard commands for VSCode on Windows.