What are the best visual studio tips and shortcuts? Update Cancel. Ad by Atlassian. What features are missing in Visual Studio Mac vs. Visual Studio Windows? What is the difference between Visual Studio and Visual Studio Team Service? What's the best Ionic Visual Studio Code extension? Is Visual Studio worth it or not? To see the Visual Studio Code keyboard shortcut you do not need to visit a web or search anywhere else. You can find it inside Visual Studio Code itself. How to find out what specific key combination is bound to which command Press 'Ctrl+Shift+O'. The key combination 'Ctrl+Shift+O' is bound to Quick Outline. A complete list of all keyboard shortcuts in Visual Studio 2017. Visual Studio 2017 keyboard shortcuts The complete list. 2012; 2013; 2015; 2017; Build Build Solution Ctrl+Shift+B Cancel Ctrl+Break Run Code Analysison Solution Alt+F11 Class View Context Menus Properties Alt+Enter Misc Commit All Edits. Step Out Shift+F11 Step Out Current. The following table contains the keyboard shortcuts for the application. This shortcut does not work for the Log and Results tabs when you use Internet Explorer. This shortcut requires Internet Explorer 10 or later. Ensure that the focus is in the body of the code editor, and then press Ctrl+F.
As a consultant, I spent most of my time developing with Microsoft technologies for almost 20 years. I have loved Visual Studio (Interdev at one time) as my coding environment. Lately, I have been using a MacBook Pro to do some cross platform development, but never really found anything that fit well for what I was trying to do. Sure, TextMate was probably my best option…I just didn’t spend enough time in it to care to tweak it to my needs.
In April, Microsoft released Visual Studio Code as part of its //Build conference. I have been using it on my MBP for most of the coding I do on the Mac. I found a number of things I really like…particularly doing Node and JavaScript development. Best part is that it is cross platform, so I can run it on my Mac, Linux and Windows machines, and I have the same editing experience. With Git support built in out of the box, what more could I ask for? Well, here are the things I find save me the most time.
Learn to Code at In this video I show you the best shortcuts I use in Visual Studio Code, as well as a few tips and tricks thrown in for good measure. This Quick 2 minute video shows you all about commenting, and uncommenting, and even has an added little trick to know about ASP.NET (ASPX) Commenting. [CTRL]+[K],[C] = Comment the current line, or selected lines of code.
When you are creating a website that is going to be using dynamic content (or just creating a demo), and you don’t quite have access to what that content is yet…what do you do? You fake it. You put in dummy text, and dummy images. Microsoft Word has the feature of using “=rand(10,10)” to generate random content, but that doesn’t help me in my code editor. The focus is on the design, not the content. But running your fingers around on the keyboard for random text is kind of a waste of time and it doesn’t really yield result that shows “for placement only” type look. Besides, you need tags in there to get what you really wanted.
Here’s where Emmet abbreviations come in handy. A simple:
This will get you four paragraphs of random length “lorem ipsum” text. You know good ol’ Lorem right? You can always look here if you need a history lesson on filler texts and the like. This can get more complex by chaining them together. For example:
Block Comment Visual Studio Shortcut
That will produce five <li> tags with three <paragraph class=”item”> tags containing a random ten word text. Like so:
<pclass='item'>Quas cupiditate eum suscipit magni esse nemo natus quia deleniti?</p>
<li>
<pclass='item'>Lorem ipsum dolor sit amet,consectetur adipisicing elit.Dolores,amet.</p>
<pclass='item'>Officiis consectetur vero numquam quaerat,nam reiciendis enim tempore doloribus.</p>
<pclass='item'>Facere fuga,dolores voluptate labore numquam corporis cupiditate iste accusantium!</p>
<li>
<pclass='item'>Lorem ipsum dolor sit amet,consectetur adipisicing elit.Tenetur,explicabo?</p>
<pclass='item'>Aliquid tempora molestiae dolore,minus nam debitis numquam?Nesciunt,quae?</p>
<pclass='item'>Perspiciatis omnis labore porro et,sit autem architecto non ad.</p>
<li>
<pclass='item'>Lorem ipsum dolor sit amet,consectetur adipisicing elit.Accusantium,tenetur.</p>
<pclass='item'>Ipsum natus,perferendis officiis ex veniam numquam assumenda nesciunt accusamus?</p>
<pclass='item'>Nemo animi molestiae,non facilis corrupti itaque possimus quisquam aspernatur.</p>
<li>
<pclass='item'>Lorem ipsum dolor sit amet,consectetur adipisicing elit.Expedita,cupiditate!</p>
<pclass='item'>Minus iure debitis dicta.Rerum dolore possimus cumque,aconsequatur.</p>
<pclass='item'>Dignissimos enim,corporis.Ex aut fugiat sapiente earum,sint enim.</p>
For more Emmet info, see the documentation here. Sure…this isn’t exclusive to Visual Studio…but I don’t have to do anything to install it and have it working everywhere.
This one is my editing dream come true. When I am refactoring code, I often find that I am adding or removing the same thing in multiple places. No…not duplication like bad code, but adding more descriptive name to items. Maybe it changing a series of properties like HomeAddress, HomeCity, HomeState, HomeZipCode and removing the “Home” piece of this. In the past, the column edit (Alt-shift) was a way to get this done. But now…WHOA! I can click in multiple lines of code in different columns and add or delete code simultaneously. This is done with the Alt-Click in the Code window.
Not only can I do the multi-select with the Alt-Click…I can select all the words that match what I am currently on. In this example, if I wanted to change the word “delorean” I could Ctrl-Shift-L the word and all instances are selected as in the next image.
If the language supports it, hovering over symbols in your code will give you useful information. This really hasn’t been that big of deal for me except for when I am messing with CSS. If you have a lot of complex selectors in your CSS, it is helpful to see how a particular selector is being considered. In Visual Studio Code, I can hover over a selector and see the “hypothetical DOM” that would have this style applied to it. In this case the selector on line 44 would be applied to an element with a class of “sports-icon-list” that contained an anchor tag (<a>) with a heading six (<h6>) applied to it. Very useful to visualize it if I really meant to have a comma in there to apply to more elements.
So when you work with bracket based languages like C#, Javascript, and C++, you can easily get lost in the mire of missing brackets. For that matter, even if you want to move to the end of the code block, it can be challenging to know you are in the right place. With Bracket Match, you can easily click Ctrl-Shift-] and go directly to the end (or beginning) of a code block. This has saved me an immense amount of time working in my Node applications or messing with Javascript in general. Helpful that it uses the bracket in the keyboard shortcut too.
Mac Visual Code Studio Shortcut For Commenting Out With Semicolon
So I have been used to this in C# for quite some time now, but having it come to Javascript (and other languages). Here’s the cool thing…there are a number of ways to make it work. If you press Ctrl while hovering over a symbol, you will get a quick popup of the definition. A quick click while you are holding the control (Ctrl-Click) and you are now at that point in the code where the symbol was defined or Ctrl-Alt-Click to open the definition in a new side window. Unfortunately, there is no quick way to go back to where you were working, so I prefer the hover or the new side window approach to editing the files.