 Hi, welcome to Visual Studio Toolbox. I'm your host, Robert Green, and joining me today is Justin Clairbert. Hey Justin, how are you? Good, thanks. Thanks for having me on. Welcome back on the show. Good to be here. Justin was on a little while ago to talk about extensions in general in Visual Studio 2017, and today we're going to talk about my all-time favorite extension, one of the most popular extensions ever, the productivity power tools. Yes, productivity power tools are very popular up in our top five extensions overall time and continue to get a lot of use and downloads from our users today. We have recently upgraded the productivity power tools to be available for Visual Studio 2017. So today I'm here to talk to you a bit about that, and also while we're at it, a bit of a refresh, run-through, go through all the features of productivity power tools so that you can have a look. So for people that may not be familiar with them, give a quick overview of what they are, why they were invented. Okay, cool. So productivity power tools is a suite of random experiments, you might say, that for features that users want, that we've been looking to bring into the product. It takes quite a lot to get a feature built into the product, but through productivity power tools, we have the ability to quickly bring up experiments, create extensions, and deliver them out to the users. So that over the time, they can be enhanced, improved, and we can see which are the most popular ones, and the features that are really well loved, we'll eventually build into the product, features that don't work out well, we might drop off, and we can keep experimenting. In the meantime, the users can have these features which might be years away from being developed into the product, at their hands right now to improve the productivity of their development. Cool, excellent. So what we did this year for 2017 is we changed the way we distribute the productivity power tools. And in the past, they were all distributed with one extension that would lay down about 16 different features that you could turn on and off through tools options. But it meant that every time we wanted to make a small change to one feature, we would have to reissue the whole productivity power tools suite, and users would need to download it all, and so that we could get better fine-grained updates, as well as allow the users to individually select just the components that they want. We took the decision this time to break all the features down into separate components. So now you can download 15 separate extensions for each of the parts of productivity power tools. And as well as that, there's a single extension which will allow you to install them all as one big bundle. Okay, cool. So I'm planning to go through it and show you that today. Great, awesome. There are two places you can acquire productivity power tools. The first place is through the Marketplace, which is where we host most of our extensions. There's over 7,000 extensions available on the Marketplace. And if you search for productivity power tools. You just noticed that it's listed right there because it's... It's currently on the front page featured. Number four with a bullet. Yes, productivity power tools. And we'll run a search here, and then you'll see it coming up here. It's got this little drill icon. Now if we have a look at that, what you see here is that it's this bundle installer that will install all of these different separate extensions for you. If you wanna have a look at all of the extensions on the Marketplace. One of the 1,000 installs already, and this week 2017's only been out for like three weeks. True, and we only put this up recently. So it's getting a lot of love. Downloads frequently. If you wanna find all of the productivity power tools, these separate extensions, you can click them straight from here, or you can search for them. Even if you search the Marketplace, order by publisher, search by publisher of PPT, then you'll get a lot of these things. And if you sort by 2017 in the version, which you can now do in the Marketplace, and maybe order by alphabetical by name, then here is a list of all the extensions that are available. These are the 16 new extensions we put out. So let's start by looking at the installer. Okay. So the installer can be downloaded directly from the Marketplace, but we can also install any of these extensions through Visual Studio in the extensions and update the dialog box, which are under the tools menu. So in order to demonstrate that, I will jump over and we'll have a look at that. Here in Visual Studio, you can have tools, under the tools menu is extensions and updates. And this is where you can see what extensions are installed, and go ahead and install more. I don't currently have any of the productivity power tools installed. So I can go over to the online tab and then search in the top right box up here. And I'm gonna search for PPT, which is our acronym for productivity power tools. Oops, what happened then? I pressed the wrong button. Searching for PPT. And one of the first results I see is the installer. And then there's a collection of the individual items have come up here. And if I want to, I can just pluck one of those and download and install it. Pluck any of these, but instead we're going to use the installer and see how it goes. So we'll download this one, productivity power tools 2017. So before you go talk to me, I think we talked about this when you're on earlier, but we changed the way extensions are installed. It used to be that they would install and then you'd be asked to exit Visual Studio and come back in. Now we tell you, exit Visual Studio, it'll be installed and come back in. What's the difference? I mean, right now you're gonna install the productivity power tools. What's the difference between letting it install, exiting, coming back in, exiting, letting it install and coming back in? The main difference is a technical difference about the fact that we now allow multiple installations of Visual Studio to be open. So if you want to install an extension, we kind of need them all to be shut down. This is a new feature in Visual Studio where previously there was only the one instance of your 2015 or 2013 installed. So because we now allow side-by-side installations, if you need to install an extension that might affect the whole suite of them, we need you to close them all down. So therefore, we don't offer a single restart option here. Instead, we say we know you want to install this. And when you've closed all your instances of Visual Studio, then we will go ahead and install it. Is there a way of installing extensions into one instance, but not the others? There is, and in fact, that's the way it works. But some extensions operate across all instances. Other extensions are just for a single instance. Oh, I see. OK. So because we can't be sure at the time, we just ask that you close all instances of Visual Studio and then the installation will occur. Got it. Productivity power tools is different yet again in that unlike most extensions that will just be installed when you start up, productivity power tools 2017, this install bundler, is itself an extension that installs an installer. So when it's been restarted and started up, then the installer will launch and begin installation of these products, which I'm about to demonstrate. So we've just scheduled 2017 Productivity Power Tools for install. So when I close Visual Studio, the installer will pop up. And now it says it would like to install 2017. Would like to go ahead. So yes, please. It detects that there's still some background processes running. We can end those now or wait for them to end. I'll close that per Watson down. And now the installation can continue. And it's done. Productivity Power Tools 2017 is installed. Bear in mind, that's the installer. So now you've installed the installer. Yes, that's right. I've installed the PPT installer. So now what we expect is that on first launch of Visual Studio, it will run in the background when it's got some spare CPU threads. Detect any that are not installed. Pop up this UI, which we're seeing now. As it goes through the list of 15 productivity power tools, each one it will download from the marketplace and then install it. So right now in real time, it is currently downloading these extensions from the marketplace. OK. And while that's going on, you could be opening projects, creating new projects, working on things. Is that in the background? Well, you could be checking your mail. But this is a modal dialog box. It's modal inside Visual Studio. OK, got it. All right. So here we go. That's going through, installing each one of these things. Once these are installed, it will require a restart of Visual Studio as we've just installed 15 new extensions. And we need the cache to be updated. One more to go. And then a list. And so here you go. Thank you. You've just installed all these extensions. Would you like to restart Visual Studio? OK, so that is a little different from mechanically. It's a little different. But at the end of the day, you install extension to restart Visual Studio. That seems normal. It's just kind of the orders a little bit different. There's the extra step because we have an installer that will do this job for us. And we might be improving that installer over time to give you a checkbox to let you know what you'd like to install on the first time or not. But in the meantime, now that it's installed, if we look in tools, extensions, and updates, you should see here the 15 productivity power tools. And here they are, all with icons that look similar. They've got a small little green drill icon in the bottom corner and a black border around them. And you can see as we scroll through that it's installed a whole bunch of these. Power commands, peak help, quick help. So now it's installed every one of these tools. There's 15 extensions. Not all users want all extensions. And so you can go through and disable or uninstall any of the extensions you don't want. For instance, if you don't want to be affected by custom document well, which does drastically change the way tabs look and behave, you can click in tools, options, extensions, and updates. And disable that extension. Or you could uninstall that extension completely. If you do that, that comes down the bottom. And as we spoke about, this will occur on the next restart. But I'm going to leave them all on for now, because I'd like to demonstrate the features and functionality of them. So you've now overwritten the scheduled uninstall. Oh, yes, that's right. So that's actually a new feature. Because you said uninstall, which normally would have started uninstalling. Great, it would normally happen immediately. Now you've scheduled it. And now it's scheduled. You can change your mind. And I can stack up a bunch of these things. And I'll uninstall this one. Oh, that's an interesting thing. And I'll uninstall this one. And then later I decide. And that little clock icon tells you that there's something scheduled. That it's been scheduled. But if I want to change it, the little X's here will help me take those things away so they won't be affected. And finally, now there's no more changes. OK, that's cool. Oh, but this is disabled. And now that's enabled. And now there's no more changes to be expected. So let's go and have a look at how these work. I'll run through them in alphabetical order. I'll spring up the page here. So this is the source code for the power tools you just opened, right? You've noticed, in fact, to demonstrate. So I can look through that code and learn how to do things like this, potentially. Oh, good point. I'm glad you brought that up. We have open sourced a good portion of this code so that users can see how we do things. And you can create your own extensions. Or if you'd like them to be changed to add extra functionality, you can get into the source code, make the changes that you want, keep it for yourself, distribute it amongst your friends, or suggest that change to us. And if we like it, we'll incorporate it and distribute it. And we did this last month. The user picked up that there were certain commands in the custom document well that he wanted to be able to assign shortcut keys to. So he made a suggestion and submitted a pull request in which he had updated and created new commands. We accepted that, pushed it out. And so now he's able to bind those commands. So we love having these open source projects. The users can come and view the source as well as contribute to it. But just for fun, we will be demonstrating these features using the source of productivity power tools. So let's have a look. The first one we're gonna demonstrate today is align assignments. I'll open up some of these in the list so we can see what we're going to go through. We're gonna have align assignments, then copy as HTML, control click, go to definition. But first, here it is. The purpose of align assignments is that it provides a shortcut key of control alt, right square bracket. And if you press control alt, right square bracket, it'll take a bunch of disorganized statements, assignment statements, and line them up so that all the equals line up together. So if there's variable length file names, it'll patch them together. Let's see if it works first time. If I say var A. I predict it will. Equals one. Well, we'll see. What about string B equals hello? And finally, if I have int I equals one, two, three. Now, if we select all these lines, press, what was it? Control alt, right bracket. Control alt, right bracket, and there we go. Let's line them all up nicely so they all fall in line. So that's align assignments. Go back to that. So let's say I wanted the variable names to also be aligned. If that didn't exist in the product, I could go into this extension and should be fairly easy to find out how to do that, right? Well, we hope so. And if you struggle, we're here to help. Right, okay. And there's our forum, the Gitter Forum, the extend VS where we encourage users to go for more help if they would like some assistance in making changes. Cool. So let's go and have a look at the next feature. Copy as HTML. This is really useful if you're trying to put code into a blog post, for instance. And the code is beautifully colored. Blue, green, black, red. And when you copy that code, you'd like those colors to maintain. So the author of this extension has enabled so that if you have some, something selected, let's take this method here, for instance, and some of the comments above it. Some gray, some green, some blue, some red. Now under the edit menu, there is copy HTML markup. And when I click that, I can show you that now in my paste buffer, it's pasted all the HTML to make this colorful. And if I was to paste that HTML into an HTML editor, it would show up looking a lot like this. An example of that, let's say we've, hang on, here's another idea. The other thing this tool does is that it includes an HTML version of this code in the copy paste buffer. If you just press copy now on this code, I'll demonstrate what ends up in the paste buffer. If we have a look in here, you'll see there's all sorts of forms of what I've copied. The raw text form, it looks like this. But there's a rich text format that's formatted differently. Now it includes an HTML format which we saw pasted earlier. So what that does is it puts that into the buffer which means if you happen to be pasting into a buffer that accepts HTML, then it will paste the HTML for you instead of the plain text. And an example of that is an Outlook email where you get the colored text. Isn't that nice? So now you can post that into a blog post and have it look as pretty as it does in Visual Studio. And- Because I have noticed that when you paste into Word, it saves the colorization and whatnot. That's probably because it's rich text format, that's right. So it takes the rich text buffer in Word. But there was no HTML. Into a blog, as you said, and you don't get that. Now you do. That's right. So that's the purpose of Copy as HTML. Another nice, simple little one. Now let's see, control click go to definition. Well, this is probably one of the most popular. This allows you to hold the control key, hover over a word, and have it navigate you somewhere separately. So let's experiment with that. This method here has got two references. I'll go and find one of these references now and we'll see if we can jump back to it. So here we go. So I've got this word, editor adapters factory service. When I hold the control key and now put my mouse over it, it highlights, it underlines it and highlights it blue. So now when I click it, oh, it opens up into the peak window. Nice. And shows me the definition of this method. This is interesting. This is peak window. And I'll talk about this for a moment. So you don't have to right click, find it on the menu, remember the keyboard shortcut. That's true, there were other options. Let's go through what they used to be. You could have right click and choose. They still are in fact. Yes, you can right click and choose go to definition. If you're clever enough to remember the shortcut key, it's F12, you can press that. But users like to often keep with the right hand on the mouse, the left hand on the keyboard. And this allows you to hold the control and just click. There's a lot of things like this in the product. Like the run to click, right? These little things were, yes, you could always find a line of code, right click, run to cursor, but you got to move the mouse, right click, search in the menu or remember keyboard shortcut. Now you just control click, you go, right? If that saved you a second and you do it a thousand times, that starts to add up pretty quickly. Exactly, any time we can take three clicks down to one, you've cut your time by two thirds. This is one of those great productivity features that really speeds things up. This peak window is very interesting in that it's a full editing document window and you can do anything in this little peak that you could do there. So if you need to quickly make a change, let's say make this not equals null, you can edit that right there in that space and then that's done. You'll notice it's also will be reflected in this file, which is where the code really was. You might not like that peak feature. And if you like to turn it off so that control click will navigate just the same way that the F12 shortcut used to, we can adjust that under the tools options. Under tools options, we have a whole section for productivity power tools and on the first page, you'll see there's the option for control click shows definition in peak. And when you turn that off, future presses of control click will physically navigate you in the page. So that's a hot setting you might wanna look into. Other than that, control click, go to definitions fairly self-explanatory, but also super powerful and useful. And as such, we are now in the process of looking at building that into the tool. No promises as to when you're gonna see it, but we know that users love it. There's some decisions to be made about whether or not this should be on by default because some users use control click to highlight a word or with different extensions have different features. So, but we know it's very popular. So we'll be working out ways to distribute this. But in the meantime, you can now get it as a extension of productivity power tools, which is the whole purpose of PPT. Yep. Let's have a look at custom document well. Well, where do we start with custom document well? Custom document well has so many features that it has its own suite of options pages for adjusting the colors, the settings. We recently introduced a new setting for sorting the tabs. This one's a little bit crazy in that every time you click a tab, it becomes the left most sorted item so that the one on the left is always the most recently used. But that has some very strange behavior if you're not expecting it. Let's go over and have a look at what custom document well does. As you open different, sorry, that's a bad file. As you open different files in Visual Studio, it lays them out. And one of the first things you'll notice is that different projects by default have different colors. So as I open different files from different projects, you'll see that up here in the document well, we're using different colors now. So I can easily differentiate groupings of projects. Something else that it offers is the ability to move those tabs, top, bottom, left, right. Let's have a look at right. If you have limited vertical screen space, but lots of width available to you, this might be a great way of getting more width. So you can now change your tabs right here. Another option is to have multiple rows of tabs. So if you have more than about 10 and it starts flowing out, there's other tiny little things. Like if a tab has been changed and it's not been saved, you can have a dirty indicator that's a disk or a large dot or a small dot. In this case, it's a big red dot. I might make it a disk. Oops, make it a disk here. And so it changes. So small tweaks to your custom document well. Again, a very popular extension. And there are parts of this that we're looking to bring into the products soon. In the meantime, I better switch these tabs back because they're a bit wacky. I can't handle them on the right. Where do I find that general tabs on top? And away we go. The color tabs are a regular expression. I'd like to look at that. Interesting, yeah, because what I would love, and I'll just play around and see how doable this is, but I'd like file types to be the same color. So all my view models would be one color and all my views would be another color and the code behind views could be still another color. I spent a lot of time pinning them together because I want all my view models up top and then all the XAML below. To keep them logically grouped together. But if you had colors that might help. Colors would be, yeah. But we do allow you to specify the colors. And by default, it'll pick up these colors here. There are these regular expressions. And here's an example where they've said, basically, if I can read and interpret this regex properly, it looks like if it's a VB file, it's gonna be blue. And if it's a CS file, it's gonna be green. So you should be able to say something like star view model or right dot. Maybe, maybe, it'll be fun to experiment with that. And whatever we can't do, if you need to enhance the regex expressions, well, I'll point you to the source code and see what you can do for me. But I'll move off custom document well. Okay. Let's see what else there is. Double click maximize. Okay, cool, simple. Here's how it works. For any tool window or document, if we double click the bar, it will maximize it. It's pretty simple. You might wonder why this feature wasn't already in the product. In a way, you could always- Because you drag- You could drag off. Find the maximize button. And double click. Again, simple little saving. Yeah, that's right. So it just makes life a little bit easier. And it also works with documents. So if you double click a document header, immediately maximize that and double click it again and bring it back. Cool. That is cool. And so that one is double click maximize. One of the simplest little ones around. Editor guidelines. So this one was originally written by Paul Harrington and he is currently maintaining his own version of this one which is a little bit ahead of ours. The history of productivity power tools is that originally we just collected great extensions that have been written by all sorts of people. A lot of the people that had been in the editor team or other enthusiasts that had given us this code and we had borrowed, procured, bundled some of their code into our tools. The original authors of these things are still maintaining their own copies sometimes and we're very happy for users to use theirs or ours. Paul Harrington has his version here and I'm just going to show it now because he has slightly additional functionality like remove all guidelines. But the one that we'll give you is quite useful and I'll demonstrate what it does. Particularly useful for people who want to have an 80 character or 120 character guideline which some old editors used to do in the past. So it could help you keep an idea of where to stop coding and where to wrap your lines. So you can introduce a line by right clicking, say guidelines, add guideline and it draws this vertical guideline down the page. And you can have those appearing wherever you like. And if you want one coming in at 120 characters here you can just space it out till you get to 120. I'm using the columns down the bottom to see where I'm at and when I finally hit 120, then I can right click and say add guideline like that. And now I've got my 120 character marker or I can, oops, I can remove that guideline just as easily by taking it off there. Cool. And that's our guidelines feature. So has anyone played around with the now auto format to stay within guidelines extension? Ooh, I like the sound of that one. That sounds interesting. So let's say I'm going to be presenting at a meetup or a conference or something. And I just know that this is how much, I want to use the guideline to tell me based on the font size I'm going to use, right? This is where stuff will scroll off the screen. So I want to create that guideline. And then form up the screen. Control A, control something and have it go through every line of code and automatically move things. I think it's a great idea. It's an excellent idea. If we get more time, we'll introduce that. I know that currently the tool has an auto format and will format lines within a fixed width that you can define. But that's separate to our guidelines extension. But I like that. That's cool. Let's see what else we've got. I love doing that. It's really easy for me to just stand up there and come up with ideas. Yeah. So edit the guidelines. Let's see what else we've got. How about we go fixed mix tabs? Now, this is one that a lot of users have seen before. It's been floating around and we bundled it into Productivity Power Tools. So it's possible that you might have seen this one once before. The idea behind fixed mix tabs. And this is going to be tricky to demonstrate as I'm pretty sure all my files are already together. But I've just, I'm just turning on white space now so that you can see, I have spaces here. If I'd like to introduce tabs, let's just go to the setting and work that out. I'm going to use my quick launch bar here and see if I can find, help me out here Robert. Tabs. Tabs, let's see. Environment tabs and windows. Let's see what we get here. What we want is under text editor. Yep. C sharp, general, no tabs. Here we'll have insert tabs instead of spaces so that I can play around with this feature. So now if I'm going to clear out this line and go tab, tab, tab, let's put in some tabs and I'll put some more up here too. Now if I save this file with fixed mix tabs coming on, column guide package, let's see. When you open the file, it should prompt me to, let's see if we can find this file to fix my mix tabs. Let's have a look. Open the file. Uh-oh, this one's not working. Let's check the extensions is turned on. Fixed mix tabs. It's right there. Well, it should be, oh, what's happened is when I saved it. You closed it, right, and then it changed everything to tabs. When I saved it, it has automatically changed everything to tabs. Now that's possibly because I have a setting which in power commands, which we haven't gotten to yet, which is to automatically format on save. Just going to have a look at this one now. Here it is. Format document on save. Okay. Remove sort, usings on save. We'll come back to those ones. But just so that I can get this the way it used to be, I'll revert this file. And we'll have an, oh, oh, sensitive buttons. Yes, I'm going to revert that file. And we'll have another go at this. We don't need Xbox running today. Now, here we go. Put in some tabs. Save the file. Now, immediately it says you have mixed tabs and spaces in this file. Do you want to fix this? And I have the choice of saying, yeah, make everything, make everything tabs. Tabify the whole lot. And now it's done that. It's changed everything to tabs. Or if I put in some spaces, save the file. Again, it prompts me. And I can say untabify. Turn them all into spaces. So now I have some consistency in my file. And then finally I can come back to my source control. Ah, and turn on Xbox. And undo that. Fixed mixed tabs. That's that one there. Let's have a look what else we've got. Match margin. Now, typically by default, in Visual Studio, if you select a word, it will highlight in the editor, all other instances of that, of that very variable. Right? And you can see them highlighted on the right-hand side in the margin, in these little purple dots. As you change words, similarly, they get highlighted. The idea with match margin is that it's not just variable-based, it's text-based. So anywhere that I might highlight, have the int. If I select int, it selects every single matching string instance of int and highlights it in the margin. So that's the idea. Any matches will show up in the margin. So that can be useful for a number of things, especially if you're trying to rename something, for instance, and you wanna find every instance that shares that same name. It'll be highlighted throughout the document. Simple one there. What else have we got? Middle-click scroll. This one's a mouse feature. So if I wanna scroll up and down this page, I can use the scroll wheel. I could press page down, page up. But with the introduction of the middle-click, we can now click, middle-click and go down, scroll up, scroll right, scroll left, and click again to take it off. So that's our middle-click scroll. You press the scroll wheel on the middle button, and then you can navigate by drawing the mouse up, down, left, and right. I don't use that a lot, because I'm a big keyboard user, but for those who like the mouse, it's a pretty neat way of scrolling very quickly through your file and slowing down and stopping. It's definitely easier than scroll, scroll, scroll. You're going to the scroll to the... Oh, so the scroll bar on the right, where I'm scrolling all the way down. Yeah, it can be useful. Or if you're lucky enough like me to own a surface wheel, surface-style, you can use that to scroll your pages as well. And I'll look at demonstrating the surface wheel in a bit. Let's see what else we've got. Peak help. So peak help. Peak help will launch help on a feature. But if you press Alt F1, it launches help and it launches it into a peak window. We saw the peak window earlier. Oh, ha, ha, ha. So typically if I had to press help with F1, it would launch a web browser and take me to msdn docs. That can be distracting, but we'd like to stay within the IDE. So with peak help, I can be on a word or a command, press Alt F1 this time. The help opens up. I can read what I need to read, and then I can press escape to get rid of that. And you can copy code out of that if you're looking to see how to use it. If there's code in there presumably. You can. It's a fully navigatable browser window. And so you can even continue to browse and navigate as you would in any web browser and get the help that you need. And then press escape to close that down. Interestingly, this works in conjunction with the control click go to definition peak window. So if I was using the peak window for this and I wanted to find the definition of that, I can open that up here. And then I can get some help in here. Now I have reused the peak window. There's these two little dots at the top that let me navigate to my other windows. Fantastic. And again, if I continue to navigate within here, it opens up more and more pages, which can, and then with the escape key, get rid of them all. Excellent. So that's quite nice, isn't it? Let's see what else there is. Ooh, power commands for Visual Studio. Power commands is a suite of commands. Lots of different useful things, like format document on save, which we saw demonstrated by accident earlier, and remove and sort using on save. These are really useful features. So if you don't want to have to always format your document and remember to remove using, this helps out. So under the options here for power commands, you can turn on format document on save, which will fix all your tabs and spaces by the way, and remove and sort using on save. So if we happen to have a couple of extra usings that we don't need, and we've got some tabs that we didn't want, then when I press save, it optimizes the usings and it formats my document. And it's going to put tabs all the way through it. That's because you asked it to. We've still got our tab setting set to use tabs instead of spaces. So I'm going to revert that back to spaces, save the document, it's reformatted all my spaces. Pretty neat, huh? Yeah. What other power commands? Let's see, present on. If you're going to do a presentation, present on is a feature that it's given me, and now I can, oh, actually, these are quick launch tasks that I've jumped into. Present off is a feature of quick launch tasks, which we'll be coming to soon. But other power commands, let's see, copying paths. There's a whole menu full of things that you can get off a project. So you can now remove and sort usings for every file. At this project level, nice. Yeah, that's right. So you'll get every single file fixed up, copy the path, open the command prompt. An edit project file. This is it. Because right now, built in Visual Studio, you only get that for .NET Core projects. But here you get them for all. Well, it's a handy time saver again. Currently, to edit a project file, you need to unload the project with one step and then open up the project file in another step. So this simply does the two in one. Okay. So I can reload this project. And now if I choose to right-click and say power commands, edit project file, it will unload the project and open the file in one go. Oh, I see, okay. So it still unloads the project. Yeah, so it's just a time saver. Very quickly gets me that. And then I have to remember to reload the project back again. So you can experiment and look for all the fun things you could find, open containing folder, open command prompt, reload projects, bunch of useful things in there, and close all documents. Oh, and recently closed documents. That's a fun one, control shift Z. Or Z for Americans. Control shift Z for an Australian will open up the recently closed documents. And there's a whole menu of recently closed documents that now appears. Very useful. So that's power commands. So after power commands, like I started getting into, we have our quick launch tasks. Quick launch tasks similar to power commands provides a bunch of features that you can use. This time you can use them from the quick launch bar. The ones I demonstrated earlier were present on and present off. You could have line numbers on and line numbers off. Sometimes you use a struggle to find the line number setting. I don't know why, it's tools, options, text editor, C sharp, where is it? General, hang on, there it is, line numbers. How could that be hard to find? So control Q, line off. Let's try at task. Line off. Did I spell it correctly? Let's just check. Two words. Oh, line num off. Okay, line num off. And now if I press that, turns off the line numbers. Cool. And similarly you can turn that back on. So that's what quick launch task is for. Line num on. Oops, we ended up in some new get package manager. Line num on. Turns the text editor's line numbers on. And there they're back again. So you can have a look through, present on and present off are probably two of the most used ones around here as we like to turn it on to large mode or small mode. And I'll demonstrate the present on feature again. Present on. Everything gets bigger. And I might continue in this motion. Including the solution explorer. Everything's beefed up. Yeah, this is great. If you're presenting to a crowd meetup conference or whatever, this is a really handy feature. That's true. So there's only a couple left. Shrink empty lines. Actually I'm finding these large numbers quite hard to handle. But let's keep them on. So shrink empty lines. The idea with this is that so that you can get more vertical screen space to see more code. Lines that are either empty or just contain a curly brace or no alpha text. We shrink those just by a fraction so that you get more useful text. It's almost hard to distinguish. But if you look down the line numbers, you can see where some line numbers have a larger gap around than the others. The ones with the small gaps that have been shrunk. I'll see if we can turn this feature off and watch for the changes in the page. We'll disable it. There's a setting for shrink line numbers under productivity power tools. Compress blank lines and compress lines that do not have any alphanumeric characters. I'll turn them both off and we'll see what changes we notice in our windows. Let's see if we can have a look over here. Change it off. And it expands a little and now we have less visible lines in our page. It's subtle. Yeah. So that's what shrink empty lines is. And if you just run with that on all the time, then you'll find that you generally can see more code on your screen. Previously it was called syntactic line compression. Shrink empty lines much better. I thought shrink empty lines made a lot more sense. I don't know it, syntactic line compression. The idea being that using the syntax of the language it would determine which lines to compress or shrink empty lines. Okay. So you might be familiar with the 2015 version of syntactic line compression. This is now shrink empty lines in 2017. And the solution error visualizer. So I'm going to present off so that I can show you more in my solution explorer. If I happen to have errors in my file, they will show up in the error list. The idea with solution error visualizer is those errors are now visible in the solution explorer. You can see them underlined in red and it uses a hierarchy so that if everything's collapsed I can look at the things that are in red like this one here, know that there's something under there. And if you hover over it, it shows them to you. Oh, let's have a look. Hover, indeed it does. And can you click on that and go to it? Indeed, you can. Ah, that's fantastic. That is good, isn't that nice? So. Yes, of course they're down in the error list. But again. It's the same. It's just a replication of the errors being shown visually. But it's in context. That's right. Helps you find them also. And I'm just going to put some errors in some different projects as well so that we can have some more fun with it. Let's see, find a cs file and just muck with it, badly. Now also, have a look at this. There's a new filter being introduced. Errors filter. So if you go by that error filter, it only shows files that have errors. So then you can work through them and fix them as you go. Tip for young players, control shift F12 will always go to next error. And you can cycle through your errors that way. And similarly, you can see them up here. And hover. If the solution explorer is docked on this side, you'll get the same features again. And you can turn this filter off here and navigate directly to the errors there. It'll show errors, warnings. In fact, it will show whatever is shown in the error list. So if you want to adjust what's shown here, you take off things in the error list and all of a sudden, as you can see, now all my red marks are gone. Put the errors back here and they appear. If you expand that file command filter, does it show you the member that has the error? Oh, down here. No, it stops at the file level. But then you hover in it and it'll show you exactly what line number to go to. Oh yeah, and here's a little collapse thing. If you don't want to see all the details, you can, there's four errors and you can fly it out to see what those errors are and go to them. So that's solution error visualizer. The next one and the last one is the timestamp margin. This one puts a timestamp in the debug output. So for this one, maybe we'll write a little program and we'll debug it and see what happens. Many just fix the errors before you do that, huh? Good idea. Let's just, let's close all files using our close all documents, make no changes and hope all our errors go away. Give it a moment to refresh. Did I make, and there we go. So we're much happier now and I'll drag this thing back over here and get rid of my errors. Now let's open up another solution and see if we can demonstrate the timestamp margin. Now I've got a little program here that will just run from I is one to 100 and print lines out in the debug console. I'll set a break point here. And I also happen to be using my surface dial. I'll hold this up and show it to you. This is, this came released with the surface, the Microsoft Surface Studio, that's right. But this surface dial doesn't need to work on the studio. You can use a surface dial on like a mouse on anything. Okay, so it's just a mouse basically. So I'm using it with my laptop and I love to use it for scrolling. It's a great natural way of scrolling and I can use the side of my hand, I can use my elbow. Well, I got my hands on the keyboard. But you can also use it for many different things. Mads Christensen has written an extension. I think it's called Surface Dial. I have it installed in Visual Studio. It's called Surface Dial Tools for Visual Studio and it provides a whole bunch of useful features that let us, oh, what can you do? You can, well, I'll demonstrate it. Mostly I use it for debugging because it lets me step over and step into and step out as I'm debugging. But let's see if this works. Kick it off, kick off my debug. If all works well, this will start the program in debug mode and stop where this break point is. Now I can take over with the power of my wheel. Wheel to the right and again. And as I wheel, the faster I wheel, the faster this program runs. Which I think is really cool. Now you see the output is being printed to the output window and next to it in blue is the timestamp of when that output was printed. This is useful so that if I then hit run, continue all, it'll print everything and then I can use these figures to work out how long the program took to take to run. Or whatever else. Personally I don't get a lot of use out of this one but for people who are doing a lot of debugging and output, this can be quite useful. So that's all the extensions that we've got to demonstrate for productivity power tools today. They come as a full suite with this installer where you can install them individually and you can uninstall them individually. And I'm gonna talk about the installer. The way the installer works is that every time you open Visual Studio, it runs in the background to check if all the products are installed and if they're not, it downloads them. That's useful for the first time but once they've been downloaded, probably don't need it running in the background checking. Each of the extensions will automatically be part of the auto update schedule. And so once you successfully installed the productivity power tools, you could possibly remove the installer. Okay. Also, if you have a problem with the installation, under tools there's reset productivity power tools and if you press that it'll clear the memory of things that it's installed and will attempt to install everything again. So I'll point that out to you now but once you've successfully installed productivity power tools, I'd recommend that you go in here just to clean up your extension so you don't have anything extra that you don't need and you could disable it or quite simply uninstall it. Okay. So I'm going to uninstall it now because it will still leave behind. Oh, and this is a key point, is that uninstalling the installer will not uninstall the extensions. It leaves behind all the extensions that are still installed. Important point to note. And so now when I restart Visual Studio, it'll come up, that'll be gone but all my extensions will still be there. And that's really all we need to show about productivity power tools but I'm just gonna finish that off. Installing it through and it's done. So there we have it. Very cool. And stuff. So, available on the marketplace, whether you go to the marketplace website or through Visual Studio extensions, it's awesome to see them for 2017. They're still available for 2015, 2013, 2012. Those ones still exist. Indeed they are, that's right. So if you haven't moved to 2017 yet, you can certainly get them for previous versions. Yep, that's right. But best of all, now you can move straight onto Visual Studio 2017 and have at your hands all the productivity power tools that you know and love. Fantastic. All right, hope you enjoyed that and we will see you next time on Visual Studio Toolbox.