How To Become A Developer Blog
How to comment out multiple lines of code in Visual Studio Code
Ademir Alijagic

Ademir Alijagic

Mar 08, 2023

How to comment out multiple lines of code in Visual Studio Code

This is how you comment out any type of code in visual studio code. 

Highlight the code you want to be commented out.

Windows

To create line comments hold down Ctrl and hit K, followed by C.

To remove line comments hold down Ctrl and hit K, followed by U.

To create block comments hold down Shift and Alt, and hit A. Repeat the same shortcut to remove the block comments.

macOS

To create line comments hold down Cmd, and hit K, followed by C.

To remove line comments hold down Cmd, and hit K, followed by U.

To create block comments hold down Shift and Option, and hit A. Repeat the same shortcut to remove the block comments.

Ademir Alijagic

Ademir Alijagic

JavaScript Consultant | Frontend | Fullstack Developer

Leave a Reply

Related Posts

Categories