 On today's Visual Studio Toolbox, Allison shows us how Visual Studio can improve your coding speed. Don't worry, we won't get too crazy. I'll keep it IntelliSensible. Excellent. Hi, welcome to Visual Studio Toolbox. I'm your host, Robert Green, and joining me today is Allison Buchholz-Au. Hey, Allison. Hey, how are you? Great. Welcome to the show. Thank you. First time guest. Excellent. I'm very excited to be a guest here today. It's awesome. We're going to talk about some more Visual Studio productivity tips and tricks. Last week, Kendra was on showing us some of the things a Visual Studio does to add to productivity, but we focus on the IDE. Okay. Today, we're going to focus on coding, is our part two of this, particularly around IntelliSense. All right. But as we go along, I'm sure you're going to talk about other things. Sure. I've been using the product since it was invented, but just practicing here, I learned two or three things. I know. I'm excited to see if- There's cool stuff to see. Yeah. It is pretty exciting that in our practice, there's already two things that you did not know. Yeah. So I'm excited to share those with you. I think first off, it probably makes sense just to talk about what even is IntelliSense. Right. Right. For any viewers who are just starting to get their bearings in Visual Studio, I definitely had no idea what IntelliSense was. I was like, oh, is it some intelligent thing that's going to help me and it definitely is. The name and imply? Yes. But in IntelliSense, I always like to think of it as our version of autocomplete. It's giving you suggestions. It's giving you options. It's not quite like the autocomplete on your phone where you only get three suggestions. It's really about giving you everything that might be relevant at that point. Right. It's not so much an autocomplete because it doesn't guess what you meant. It doesn't guess. No. It doesn't just make stuff up. Exactly. Therefore, get half of it wrong. It says, is this what you meant? If so, you don't have to do all this typing. Exactly. Yes. As many of our developers know, so much of our time here on the Visual Studio team is about saving you those extra keystrokes because those add up. They add up. You save someone one keystroke a minute when they're at their machine for eight hours a day like that compounds. Yes. IntelliSense is really meant to help you do that. All right. Let's take just a quick example here to see what IntelliSense does. So, I'll zoom in here. You'll see this box here that just appeared when I typed if. So, this is our IntelliSense box. Right now, it gives us any suggestions that might be what we want. So, you'll see here it highlights. Including the code snippets. Including a code snippet. That was one of the things that I did not know. Yeah. 20 minutes ago. Yeah. So, I know you're a big code snippet fan. IntelliSense does have code snippets. Actually, if you were to press this button down here, it would filter to the code snippets that match if, which I think is pretty cool. So, what's pretty great is that IntelliSense will try to highlight what it thinks is most likely. So, in this case, we've got a perfect match with if. But we also have things like iCustomFormatter so it does camel case matching. It says, hey, maybe you want an iFormat table. It does matching on a variety of things here. So, you've got members and classes and interfaces, and it'll search everything in your code base to give you a list of suggestions that might help you out. And you can just scroll through with the arrow keys or with your mouse depending on how you like to code. Right. Cool. So, now it's gone here. If you ever accidentally get rid of your IntelliSense window, you don't have to backspace and retype it to get it back. You can just do control space and it's back again. So, here you'll see we've got classes, delegates, namespaces. These are all filters. Let me go ahead and zoom in there real fast. So, these are all IntelliSense filters. So, I mentioned it pulls a wide range of things from your code base to help inform you of what you'd like. But in this case, there's a ton of them. If you wanted to filter them down, you can either select any of these filters with your mouse or they all have shortcut keys available to them. So, if we were to activate that again, you'll notice when you hover over them Alt-C, if I did that here, would do the classes. You can always escape to get out of it. So, I think that's pretty great. And then, I know one of the other things I was showing you today is if you have your IntelliSense window here and maybe we're not in an if-loop. Maybe we are in a method, right? We're trying to fill in our parameters. There's an example. But it's hidden behind my IntelliSense box here. What would you do? Normally like escape and look. Escape or hope that it fades or wish that there was a way of getting it to briefly disappear. Well, do I have a trick for you? If you just hold down control, it will go transparent enough for you to be able to see the code underneath. Which, again, one of those hidden gems, I use this all the time when I've got a really unwieldy method that's got a ton of parameters. And I'm trying to look at the example right underneath it and it has saved me so many times from having to exit out, write it down on another piece of paper or add in a bunch of enters. Or scroll the window or something. Yes, that is exactly right. So, that's sort of a nice, I think, quick overview of IntelliSense. Another great thing, let's see if I go up here. You'll notice we have some regular expressions up here and, unfortunately, we're in our GA release, the Visual Studio right now. But in our latest preview, we actually give you IntelliSense off of Regex expressions, which is pretty cool. But what I think is even cooler about this for our users sort of new. And that's coming in 16.1, which is not that far away. It's not that far away. I actually think that might have been released last week. Oh. Maybe. Okay. The preview is definitely out. 16.1 might be out fully. But it is in 16.1. If we were to try and activate IntelliSense, if we were in 16.1, it would give us some nice little IntelliSense there. Cool. But what I think is sort of cooler about this is that you're not just getting IntelliSense for Regex, right? Because we decided to. There's these great things called textmate bundles. And those allow for any language to sort of add in to their language service. And it allows you to get simple colorization and simple IntelliSense for that language. So things like Go, right? It has a textmate bundle for Visual Studio. So you get basic IntelliSense. So you don't have to just stick with the languages that our team supports. So that's an extension somewhere. You can get that in the marketplace. It's part of just like if you open a folder with Go, Visual Studio just knows that there's a textmate bundle for that and pulls it down. And it will give you that automatic colorization as it is, which is really cool. It's great to know that IntelliSense is not just something we support for our own native languages, but for our community. Visual Studio is really a tool for any developer, I'd like to think. Cool. Let's see. Do we have, oh, one other great thing that we get with IntelliSense is this little box here, which is our signature help. So it gives us a little bit of information about what this method might do. And I don't know about you, but I definitely don't know all the methods and what they do off the top of my head. So it gives you information about the parameters you'll have in there or the arguments you'll have in there. It gives you a little bit of a description of what it will do. And even if those are your own private classes, as long as you sort of have those descriptions as part of it, IntelliSense can bring those in. And that window was became color coded, I think in 2017. I think it was just all gray. It was all gray. It was really hard to tell where things were separated, but we've tried to make it a little easier to scan. Cool. So that's typing great things to help you have less keystrokes. Another thing that I sort of like to show and I know always helps me code a little bit faster is the ability to navigate really quickly. So I know what last week you guys learned about GoTo. We did navigate backwards. Navigate backwards. And then go to last edit. I know we did those, but that's not all of them. That's not all of them. Yeah, so those involved you sort of flipping back and forth between different files, right? But sometimes I feel like I just want a little peak into what this method is doing without having to leave my context. So what I can do is I can go right click peak definition, which is also Alt-F12, keyboard junkie. And it gives you a peak into this file. So here I can see what specific emoji does. I can investigate how it works. And great thing is that IntelliSense also works within this window. That window is editable. Yep. Totally. Can you set break points in there? I do believe you can. No, you cannot. Yeah. There you go. There's my feature request for the video. All right. I'll be sure to relay that to the team. I thought you could, but apparently not. But yeah, it's totally editable. I can go back space here, bring up IntelliSense. It says yes, we want to do our success. And I can even save it. And if any of you are watching closely, emoji search up here also had that little star go away. Cool. Yeah. So I think, you know, those are, it's one of my favorites. If you want the full, you know, file flip, so you can investigate more fully, you can also just do control click, which is go to definition at that. Which is also F12, if I remember correctly. It is F12 is, yep, yep. So F12 will bring you to the file. Alt F12 will give you just the peak. So hopefully a nice complimentary keyboard set. All right. Yeah. So that's just a quick overview of IntelliSense. Awesome. And I hope anyone who, you know, either has been using IntelliSense for many years, learned a new trick, and anyone coming to Visual Studio for the first time just has a better understanding of why it's such a powerful tool. Yeah, that's great. So let me ask you a question. So looking ahead, what are some of the things that we can expect to see moving forward in IntelliSense if you can share some future stuff with us? Yeah, so one of the coolest things I think, and I'm definitely a little biased because it's my area, but we just released for general availability something called IntelliCode, which takes IntelliSense and super charges it, is what we like to say. So it takes all the great things about IntelliSense of producing your keystrokes and takes it to another level by infusing it with machine learning. So we take the wisdom of the community of over 2,000 open source repositories, and instead of just an alphabetical list, we give you a starred recommended list. So it takes your context into account in order to give you much more similar to autocomplete where it says, hey, this is probably what you want next, and it's not just an alphabetical list. This is the 12th project in a row that you've created a method like this. Do you just want me to autocomplete the whole thing for you based on? We're a little far away from that. But that's kind of like where you can see it ending up someday, right? Fingers crossed. Right. But yes, yeah, right now it's more of just we notice you're using this class and within an if statement, you always call this method. That's sort of the thing we tend to do. Or it could potentially detect antipatterns, right? Maybe soon. Okay. Maybe soon. We're hoping. There's a long road ahead. And I will be excited to do a deep dive of that with you. We'll definitely do that in a few months when it's, there's a little bit more. Stability. I was going to say when you've thought about it more, you've seen how it's being used, you've got a sense of what it can do. And then we can talk about how it works, but also some tips and tricks on using it. And then we can talk about science fiction in future worlds where this thing could go. Yeah, I'd love that. And maybe we'll be extra lucky and we'll finally have that code snippet on demand for you. It probably won't be a clippy thing where it says, hey, it looks like you're writing an expense report app. Hopefully not. We're going to try to avoid becoming a clippy, but hopefully people will find it a little more useful than a non-machine learning intelligence. Yeah, totally. We've seen a couple of demos of it and we had Mark Wilson-Thomas on the show a while back giving kind of a preview of it. It's really, really cool stuff. So we'll definitely revisit that. That must have been like a year ago, right? Probably. Yeah, we've come a long way in a year. All right, thanks so much for doing this. Thanks so much for having me on. Hope you guys enjoyed that and we'll see you again next time on Visual Studio Toolbox.