How to comment the code in VSCode editor

Categorized as VSCode Tagged

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 comment
Ctrl+K Ctrl+U Remove line comment
Ctrl+/ Toggle line comment
Shift+Alt+A Toggle block comment

See the full list of keyboard commands for VSCode on Windows.

Leave a reply

Your email address will not be published.