There are lot’s of keyboard short cuts in Visual Studio that I use every day and it still surprises me how many of my peers don’t know they exist. So I thought I would start providing a few for reference.
As this is my first post on the subject I’ll give 2 short cuts this time round.
Ctrl+k, c – Meaning: While holding down the Ctrl key press K followed by C. This will add comment markers to the current line or currently selected block of text. The cool thing about this is that it works in most code types, for example C#, VB.Net, JavaScript, Razor and HTML.
Ctrl+k, u – Meaning: While holding down the Ctrl key press K followed by U. This will remove comment markers from the current line or currently selected block of text.
That’s about it for now. Thanks for reading and see you next time.
Those are great shortcuts, I use them all the time. Once you get used to them, they are a lot faster than clicking the buttons on the toolbar.