panapd.blogg.se

Microsoft visual studio code key bindings
Microsoft visual studio code key bindings












If you want to comment out multiple lines of code within the same comment, this is what you're looking for. These are comments which span multiple lines of code (a block). Some programming languages support block comments. I use this command constantly and can't imagine not having it. Once you do it a few times it will become muscle memory and boost your productivity. Select the code that is currently commented-out and execute the shortcut.

microsoft visual studio code key bindings

You can also uncomment using the same command. Execute the shortcut that corresponds to your platform.Select the text or code that you want to comment out.This is probably the most useful shortcut in here. This is the other main usage of comments. The VSCode comment shortcut Mac is very similar to the Windows version. Then, use the VS Code comment shortcut that corresponds to your platform below. You'll use this mainly to add information to the flow of your program that will help your future-self and your colleagues understand what's going on.įirst, place your cursor where you'd like to add the comment. Here's how to do both in VS Code: Create a Comment in VSCode, the easy way. Add information that gives context to your code.This comes in handy when debugging your program. The other great use-case of comments is quickly disabling one or multiple lines of code. Every comment you write could save you and your colleagues some back and forth on slack. This is especially useful if you work on a large team with lots of people.

microsoft visual studio code key bindings

When building out complex functionality, sometimes I'll even write out the whole function in pseudo-code comments before writing any code.Ĭomments make code more readable and understandable.

microsoft visual studio code key bindings

I don't know of a programming language that does not support comments.Ĭode-comments are incredibly useful.














Microsoft visual studio code key bindings