Keyboard: CTRL + K, CTRL + C; CTRL + K, CTRL + U
Menu: Edit -> Advanced -> Comment Selection; Edit -> Advanced -> Uncomment Selection
Command: Edit.CommentSelection; Edit.UncommentSelection
Versions: 2008,2010
Published: 12/7/2010
Code: vstipEdit0083
Comment
By now you probably know that you can comment and uncomment your code but did you know you can do the same thing with your source during web development? It's easy! Just put your cursor inside any element you want commented:
Now just press CTRL + K, CTRL + C to comment out the selection:
Of course you can also select multiple elements:
And comment them out, too:
Uncomment
Naturally, you can put your cursor inside any commented area:
And uncomment (CTRL + K, CTRL + U) it:
