Comment Out Multiple Lines of Code
There is a quick and easy way to convert multiple lines of code into comments. Simply add /* to start your comment, and */ to end the comment block, e.g. /* my commented out code */
Alternatively, you can also use the following method:
- Place the cursor at the beginning of the first line that you want to comment out.
- Hold down the Alt key, and then press the left button of your mouse.
-
Drag the mouse down to the last line that you want to comment out. A thin, vertical highlight line will be visible.
Note: Release and start again if the first character is captured. - Release the mouse and the Alt key when you have the desired lines.
- Type //.
Note: The comments can be removed by repeating the same concept.