

Non-Keyboard Visual Studio Comment Shortcuts I’ll admit, it’s a bit easier on the eyes.


It doesn’t, however, leave a space between the comment characters and your code this has been known to upset JS linters that like to see that space by default. If you’ve got the cursor on a line with no highlighting, it’ll just comment the line from the start of your code. That all depends on what you’ve selected with your cursor. The comment shortcut will also lay down comments on a single line or multiple lines. It can comment in HTML, JavaScript, SQL, C#, CSS-you name it! Now, Visual Studio knows how to comment in several languages. And to round it out, the mapping for uncommenting is Ctrl+K, Ctrl+U. I’m going to stick to defaults, but later in this post, I’ll show you how to change those. This, of course, is the default shortcut for Edit.CommentSelection, which can be mapped to whatever you’d like. : Open Smart Tag to allow adding missing namespaces or refactoring code.Ĭtrl + Q: Focus in Quick Launch text box.Ĭtrl + Shift + V: Cycle through clipboard ring.The most basic shortcut for creating a comment is Ctrl+K, Ctrl+C.

Here are 10 areas that you should definitely be familiar with:Ĭtrl + K, Ctrl + D: Formats the current documentĬtrl + M, Ctrl + M: Collapse/expand current elementį12: Go to definition of current code elementĬtrl +. You can configure them according to your preferences under Tools->Options->Environment->Keyboard. But Visual Studio is really keyboard friendly, and you have keyboard shortcuts for pretty much any functionality that is exposed via the various menus. Most developers are familiar with using Ctrl + Space for intellisense, or Ctrl + Tab to cycle through open windows in Visual Studio.
