Visual Studio Productivity Tips

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
>> Hey, Kendra. I'd love to have you on the show but you've just recently talked about all the things that are new and Visual Studio 2019. So what do we do? >> Well. There's a lot of stuff that's not new, but people might have missed in Visual Studio. We could talk about that. >> That's a great idea. >> Great. [MUSIC]. >> Hi, welcome to Visual Studio Toolbox. I'm your host Robert Green and joining me today is Kendra Havens. Hey, Kendra. >> Hi. It's Good to be back. >> Welcome back in the show. >> Can I introduce myself just in case? >> Sure. >> I'm Kendra Havens, Program Manager and .NET and Visual Studio.That's all I had. Okay. >> So you spend a lot of time speaking and showing off things that are new in the product. >> Yes. >> So we just shipped Visual Studio 2019, and you of course are featured prominently in the launch, and you speak at things like build cores, showing what's new in the product, in the latest version of the product. >> Yes. >> Of course people want to know. >> Viewing into this things, is definitely what people want to know. >> But at the same time, we know that there's all kinds of things that have been put in the product previously that people may not know about. >> Yeah. Sometimes I always want to bring these up in touch back on things that are just really very useful, that we almost never talk about in all of the newer talks. >> All right. >> People are so focused on new things, but there's still great productivity test that I want people to know. So I'm excited we're doing an episode on them. >> So we're going to talk about things that are in Visual Studio that can help productivity and they may have been there all along. They may have been introduced by the previous version Is there anything literally knew in 2019. There's all this stuff. >> Yeah. I believe I will cover some of the Git changes in control Q. Control Q now indexes a lot of Git commands. You can search them, and it'll pop up in your Test Explorer. I'll show that in a second. Like some of these I just learned about, like two weeks ago, even though they've been in the product for many years. I've worked on the product for many years, and I still just don't find them immediately. >> It's always tough to learn. >> So. >> All right. >> Yeah. >> Cool. >> Should I do an apology? Like sorry if you've heard this before, and you can mock me if you already known about these things forever. But might not cover him. >> No I think the rules for having a Git show or get Git guest, don't do all the talking. [inaudible] mock your guest. >> [inaudible] a little bit. >> You can tease. >> I do well with adversity. Okay. Should we launch in? >> Let's do it? >> Okay. So the first thing I wanted to show. First, I'll introduce you to my solution. So this is my productivity features app. This is open source, everyone can go and download this. This actually has all of the quick fixes, and refactorings that we have added in previous releases. >> Nice. >> So yeah. You can scroll through, and how to trigger them. So it also contains all of the code that one would need to trigger these, which is sometimes what people are trying to find. So like something like wrapping parameters. Isn't that kind of thing? That is the wrong keyboard shortcut. Let's see. Control that wrap every perimeter. So it just like gives you an example of how to trigger all of these things, and link instructions on where your cursor there needs to be because some of them are really contextual. So just kind of a helpful thing, you can get to this by using, it's in Kendra Havens' productivity features on GitHub, or you could use in aka.mslink/netfeatures2019. So that'll take you right to the link here. Okay. So introduce my repository. The first thing I want to call out are a lot of just general navigation tips. I really love this navigate backward, control minus. I'm sure you've used the some. >> Yes. >> Right? It is just really nice to go to wherever your cursor was previously. So, and kind of understand like where were the last times that you were changing code or writing anything. So that's pretty nice. >> How far back would you go? >> I don't even know. >> A lot. Okay. >> But I actually finished. It was three, but I'm not sure. I might have only like just open the solution. Yeah. >> Okay. >> So I'm not sure. I can even like do a drop down and go back to where I just launched which is kind of cool. >> That's cool. >> So it keeps some navigation history. Maybe it is limited at five, let's see. >> [inaudible] . >> Five is well enough, right? >> Sure. >> I'd be happy with it. Let's see. Now, keeps going. >> Excellent. >> Not sure with the limit bar. >> All right. >> Okay. This one is another big one. When I have a few things associated with the Solution Explorer. So you can sync with your active document. It is also "Control" open "Square Bracket" S, which is difficult to remember, but. >> Difficult to say. >> We also have this icon right here in this Solution Explorer. It's another one of those that I think this has been there for years, but I still get people asking about it on Twitter. So it's fine to call out. So whatever document you have open, I can "Control" open "Bracket" S and it hopes to highlighting that file in the Solution Explorer. So just lovely. So that's sync with an active document, and you can just trigger this in a one-off basis, or there's actually another setting that you can permanently turn on to always track the item that you're on in the Solution Explorer. >> Is it off by default? Okay. >> You're like why did we do this? >> Sure. >> Yeah. >> We have good reason. We don't want things things get wronged. >> Two things that happened. One, is we asked a lot of users or b, we flip the coin. I'm predicting it was the former. >> No. I think this is really helpful. So if I select that and then I switch to a different document, you can see that the highlight also automatically changed in the Solution Explorer. >> So you might not want all that flickering on this, in the solution. >> Yes. >> Okay. >> Yeah. You can get there again by just track active document. I'm going to uncheck that because I'm actually, I don't want it on all of the time. I don't need that much selection happening all the time. Okay. Speaking of more navigation, I also did little of this on Twitter from one of the people. I believe he is on the the editor team, but it is "alt" tick. It opens a special context menu that is different from "right click" that has specifically more editor commands on it. So if you forget any of these like go to complaining block, go to next issue in file that's navigating through what areas you have in that kind of stuff. There's navigate backward, I'm going to definitely cover, go to last edit location also really going right. >> So if you "right click" on that. In that spot what do you get? You get an integral. >> If I right clicked here, totally different menu, this is run test. We still have find all references and some stuff. But the. >> Auto tick. >> Auto tick. The tick is that, what is the other word for that? >> Apostrophe. >> It's the weird apostrophe. >> The "Tilda" >> It's on the same key is the "Tilda" >> Okay. >> Yeah, you're right. >> Okay. >> You're absolutely right. That's a good way to explain that. I'm sure it has a name. >> What's "tick." >> Yeah. I think it was "Control Tick" to open the terminal and the s-code for a pretty long time. Some people use that same key. >> All right. >> Cool, in case you want to know. Okay. This is another one of my things that I love. So did you know, you can "right click" on a Project Node in the Solution Explorer and "open file" in File Explorer? >> Open the folder. I knew there was, yes I think I knew that one. >> So this actually wasn't bound to any command, but I went ahead and bound it to "control O O," so that it opens up really quick. I have been doing terrible things for like years before he discovered this. So I would try to open, I would have Properties open all the time. >> Go to "Properties", go to find the file, yeah. >> Which was so silly. So it show up here, and I do something terrible like trying to copy this full path. Then, I try to go over to my, just wasn't a good life. Wasn't a good life experience for me. Then, when I do anything or tried to open that particular file. So I'd have to delete the final name to actually go to the folder. >> Yeah >> Yeah. >> It's a lot of work. This is the shortcut to do that. >> Why Kendra? Why would you be doing this? >> Yet there is a short cut to do that. >> Your life is so much better. Right? So I match this shortcut myself and I can go ahead and show you how to do that. If you don't have a shortcut right now, it's just open if, just "right click" on any folder or project. So you can't "right click" on any files in general and do this. >> Now, Okay. >> Which I don't know? Maybe we could fix that. It's open folder in File Explorer. So my next check is how often are you using a keyboard shortcut, or there's a command that you know was the keyboard shortcut, and you're trying to find it again. >> I know that a lot of people do. Personally, I don't use that many keyboard shortcuts because it's hard to remember them. >> That's okay,is when you do it. >> When I do memorize, when I use it all the time. >> Excellent. Yes like call clean up. >> "Control K," "Control Left," "Control K," "Control E." I use that all the time. >> Yeah. >> Me, I can only remember like four of them. >> No worries. Totally right. So if you're ever wondering what a particular keyboard shortcut is mapped to, because like when you trigger it you're not using it in the right context, or it's not doing anything. You can always type, you can go to "tools options" keyboard, "environment" keyboard. >> Remapping them. >> You can type that. >> Could make it more. I should actually do that. >> you can show >> I should really map with bunch because then I could do "control R1" Right? Then, my top ten. >> Yeah. Then you know it's always something in the left keys or whatever. So this is how I know what I've already mapped something to, or if I'm trying to map like. If I'm trying to map something new. >> Yes. >> And I want to do something but I don't want to break any existing key bindings. So he just wanted to check , what's currently using "Control Shift Slash". Then, it's like Toggle Back Comment, and I actually don't want to use that. That's one in the next one that I'm going to show us. Yes, you can always check what a shortcut key is mapped to. >> Okay. >> Then we are doing ''Open Folder'' So this is the "Open Folder In File Explorer" command and I can search it here. Then I can see what keyboard shortcut it is already bound to. If I wanted to bind it to a different one. I don't think I will, because I'm going to forget it. Because I really like "Control OO" because that is already figured out. >> That would be an awesome job. >> Yes. That's how you do it. >> You can [inaudible] machine you'll need all other shortcuts. >> Awesome, or mean, cruel, terrible. No. It's okay. It's just because my life revolve around keyboard shortcuts just a little bit. It's tough. So have you ever read this text in the "Search Explorer?'' I literally had a bug file, let's say, click on it. This "Control Semicolon". I had a bug filed like, why can't we just jumped to that "Search Bar" in the "Search Explorer" and why can't we just have a keyword shortcut that does that? >> It's a great idea. >> It's been there and I agreed with it and I was like yes we should add this. Eventually someone who knows what's going on. Was just here, got back to me and was like, "Oh yes, we've had that for forever.". >> So then you changed the bug to improve discoverability of existing shortcut? >> Right. The response was obviously, this is part of the main experience of Visual Studio, like as soon as you open Visual Studio the text ''Search Solution Explorer Control Semicolon'' is right there on the screen. You still missed it Kendra. But it's okay. This why we're talking about it. I'm sure there are people who've also seen this. Cool. So here's another one that I just want to call out specifically for folks who are finding themselves in the situation a lot. So let's say you have a .SLN that you're trying to open with Visual Studio. But you have about 50 versions of Visual Studio installed. >> Okay. >> I can't actually distinguish between like, if this is 16.0. If this is 16.1. These are obviously previews. But I don't know which preview. One of them is my internal built for extension owners, one might be their specific version. They are also currently building and that's just the build they have in their machine. So just a note, we always order these from oldest to newest. It kind of makes sense because I have 2017 installed right there in the preview. So you can kind of be how we're ordering it. But it's just a good way to make sure you don't feel like you have to guess. >> Okay. >> So I really appreciate that. So I think, we can move on. So I have some more navigations. some more just helpful stuff. I tried to group these logically. I could not find a way, because they are just little things. >> Cool stuff. More cool stuff. >> Cool stuff. >> Even more cool. >> Yeah. "Clipboard.'' You can actually see your clipboard history. >> Yes. >> You've used this? >> I think Matt's showed that in a few episodes ago. >> Oh good. Okay so I guess they don't need to show a ton of it. But I should have made this in like quiz form. Like how many of you know what keyboard shortcut used to access your ''Clipboard History.'' But yeah. So that's "Control-Shift V" which I love. Because "Control V is obviously very much already associated with ''Clipboard'' in our minds. So good idea. So this one I actually do demo a lot. It's "Control T" "R" which opens the files I've recently had open. Or rather just opens up page where you can see the files I've recently had open. So it's "Control T" and then you just type in an ''R'' into this "Search Box". So normally "Control T" is like yeah, I go to "Files", "Members", "Types", whatever and we recently added. We go to recent files which again just super cool. So I'm not sure, if I should "Control-Shift Backspace.'' Which is go to last edit location. So it's a bit different than navigate backward. Because that's just I believe the last place but I had my cursor. But "Control-Shift Backspace" is actually where I last edited code. >> Cool. >> Also just see when I start.If I add in some spaces there, I can kind of hop around. >> Nice. >> Yes. So this is one, I'm sure you probably know. Let's see if I can actually find my string for this. Let's see. There we go, MultiCaret. So MultiCaret. Do you know the keyboard shortcut? Now I'm going to quiz you. >> No. >> "Control, Alt, Click''. You can click in multiple places in your editor and add some text. Wherever you have clicked even if it's on the same line. If I click out of this. When I "Control Z," it'll undo each of the places I had this complicated Caret. >> That was "Control" what? >> "Control Alt Click." >> "Control Alt Click." >> If you are a mouse user and you want to do that. If you instead are editing something that has like a lot of things that match it. You can use "Shift Alt dot " to highlight things that they're matching Caret. >> Oh nice. >> Which is also really cool. So if I wanted to change all these to like suggestions and my editor can fake. I can just do it. >> I suppose that works in XAML, does it? >> It is an editor wide feature. >> Because that would be cool. If you decided you wanted to do a different color everywhere. >> Like over here? Let's see. >> Different styles or something. >> Well, it won't.What about after every - >> It does. >> Yeah. >> Nice. >> Gosh, doesn't that feel good. >> Love it. >> I love on the fly demos. Just saying, I am using and preview and that is internal. I get those all the time. No, so you don't have to. So that was Multicaret. If you ever forget. I do think those keyboard shortcuts are really difficult to remember. We do have "Edit Multicarets". >> Well, okay. >> So you can kind of see "Shift Alt dot" and "Shift, Alt, comma.'' >> Sweet. >> Yes, that's pretty nice. We should add "Control Alt Click" to that though. Maybe that somewhere else. Anyway, that's okay. You get the general idea. Multicaret, it's really nice. I think I downloaded in link preview at the last [inaudible] I downloaded it again in more of like a subtle way. We were also just edited the editor Config and we got a lot of [inaudible] from the audience. Then I mean they didn't say anything, but I'm there for months. But it's okay. >> That's okay. >> Everybody loves this. >> It doesn't matter when it arrived. It's there now. >> Definitely. So generally, I just feel like you should know. I am a really big fan. I'm becoming more and more of the big fan of the "Team Explorer". When I first started using Visual Studio like five years ago. I was like, I really just need to stick to the Get Command line and get version and everything. That's sort of I'm really really comfortable with. But more and more often, they keep adding these little features that are really getting me.I should probably give this feedback directly to the team. Well just make it up as I said on it. So if you hit "Control Q" and you're now typing "Get-Commands." You can actually find these in the "Solution Explorer" or in the "Team Explorer". So if I just type enter it automatically opens up the changes tab. >> Wait, what? Try again. >> So ''Control Q.''. >> What did you just do? >> "Control Q" is like the general big search. Does like a big thing built on everything. You can do a lot of things. That now, if you type Git. It actually has like menu commands, that will actually opened in this part in your history or your Team Explorer. >> Oh that is so cool. >> Right, it's not bad. I really like this. >> That's awesome. So if you know, that Git Command and now you're in Visual Studio, not necessarily wanting to be typing the commands. But you know you want to do something that will show you how you use Visual Studio to do it. >> Yes. The great thing is like - >> That is cool. >> It's so cool. We're geeking out over here. This is a fun episode if only we watch it. Anyway. >> I never watch this. >> The great thing is, if I type ''Git Command'' it doesn't actually do a Git Command. I can still see what all the changes are currently. Then I type a message or whatever and that's when I would hit ''Command''. So it just opens up the Visual Studio like pane where you would do this thing and it doesn't just automatically. Which is really nice. So speaking more on the Team Explorer. Did I set up very well for this? How many times have you actually made a lot of changes but then you realize oh crap I'm still at master and went to branch my code and then did the changes. Then make a command. Then once my branch is good. I'll merge it into master. >> More than zero. Less than a Hundred Thousand. >> Right. So you can actually stash changes super easily. So I'll just stash all of these. I'll go ahead and save this. Right, I can quickly create a new branch and I'll say my feature branch. >> Sorry. >> No, spaces. >> Why would I be using a space? Get it together, Kendra. Okay, cool. So now I can go back to my changes. Oh shoot, did I forget how to do this already? Sorry, I am super new to using this. >> So you stash them on mass. >> Oh, there it is. Sorry, they're right in front of me. >> Okay. >> Okay. So I want to go ahead and pop these, right? So now they're all back, and now I can just do, first commit to. >> That is cool. >> To a branch. >> I did not know that. >> All of that anticipation was planned. I knew it the whole time. Sorry. So it ends up in this little stashes node, and you can just right-click on it and pop it. I can do all of this from the command line, but then I'd have to go to the command line. >> You have to go to the command line. Right. >> Honestly, this is just really nice. Also, it's way more visual that I can actually see what changes I'm making. Before I even do that, if I could actually, maybe I'll just go back to master. No, that doesn't really matter. All I really wanted to show was, if I made a bunch of changes in places all across my code. So let's do "Shift dot dot" to do suggestions, all of that. You can see them adding up over here and changes. >> Right. >> I can easily click on these, and it could open an Ubi diff. >> Yes, that's cool. >> Showing the distinction. Another thing on our Ubi diff, I think this is just spaces. Let me make a bigger change. Just delete something. Do something like that. There we go. So our diff here is actually really cool in Visual Studio, you get a lot. I believe you get, let's see. Oh yeah, full IntelliSense when you're typing, while you're still in a diff. >> Nice. >> Which is just cool. So you have all these editor features. >> Because this is just the editor. >> You can get IntelliCode. You can actually debug a test, which is just wild. >> Yeah. >> If you install pull request for Visual Studio, it's an extension right now. >> Right. >> Super sweet. You can easily pull your coworkers PR and their code onto your machine, and you can actually debug their gif, which is wild. >> Yeah. >> I'm not sure. >> That is awesome. >> I'm not sure if we've fully planned all of it to work that way, but Ubi diff does just inherit all of the great editor features, in addition to having this plus and minus changes type viewer. It just gets all of them. So you still syntax highlighting and all of that, which is so much nicer than viewing it in the browser. >> Yeah, that is very cool. >> I'm huge fun of this stuff. >> Ubi diff. >> Yeah, sorry, I keep saying that. I guess we just call it a diff viewer. >> What's the Ubi part? >> I'm trying to remember where that came from? >> Ubiquitous? >> Could be. >> I don't know. >> Sorry. >> All right.. >> I hear the teams talking about it and that's why I used it. >> Okay. >> I think they actually did tell me once in a demo, it's okay if you don't. >> Just call it what it is, it's easier to say. >> Call it Ubi diff, nobody knows what that means. Anyway, Team Explorer sneaks up on you with how useful it is. I think they've added a bunch over the past few years, and give it a shot, guys. I did, and I'm really happy about it. >> That was very cool. >> I was totally a Git command line, Git Bash user, and that's all I wanted to do, but it's nice. All right. One of the super common requests that I get is actually, let's say, I have a block of code and I want to insert it all the time. Can't we have some refactoring or something pop up that I can just input this code block anywhere I want. That's why I say, do you know what feature I'm going to talk about? I'll take off the pressure. >> How is this different than a snippet? >> It's a snippet. >> Yeah. >> It's a code snippet. So this is "Control KX". >> My goodness. >> Thanks for letting me put you on the spot. See, this is why I asked you to be mean to me. >> All right, I'm going to be mean. >> If it doesn't happen. >> If it is still can't, highlight, right-click, say this snippet, right? >> Right. >> Yeah. Okay. Let's not go there. >> Sorry about that. We do have nice, so you can create you're own snippet. That's another thing I wanted to call out. We have a lot of stuff built in. Let me choose one that I want to insert. So it'll just insert whatever you select there, and it also will have certain things highlighted. Let's do a test. Yeah, I could just insert a test method or whatever. I don't have this code, that's why it's causing an error, but just one of those helpful things. We have a lot of pre-built ones. You can also make your own, create a snippet. Now as easily as Robert would love us to. Create a code snippet. I wouldn't have been surprised if this auto-completed. Yeah, because I've been to this page so often, tying to link in bugs that people open. So yeah, you still have to right some odd XML. But then you get to trigger it like, "Oh, I want these certain parameters to auto fill." So I can insert my snippet, hit "Tab" a couple times, so I can rename and customize the first one. >> Yeah. >> If you know which fields you're probably going to want to customize. So that's pretty cool. Along the same lines, and I really like this one, is surrounds with snippets. Have you used this one before? >> No. >> "Control KS" will surround things like that. So now I have another for each loop inside this. >> Nice, that is cool. >> That's really sweet. I want to do this more, looking for places where it won't cause errors. But, "Control KS" again, so I can create a region, which is really nice. So I think that's actually a super helpful one because people are constantly doing that. We even have like if statements. That's going to be, there you go. >> Yeah. Lovely. >> It's just really clean, really fast. Okay. So these are all the little things that I had. >> Cool. >> We can move on to preview features, if you want. >> No. >> Do we have time? >> No, let's stop now. >> Okay. >> Let's just do stuff that's shipping now. >> That's all you get. You can see preview features in other videos. This is all about stuff you should already know about. >> Yeah. >> Or that I should have already known about. Don't put the blame on me. >> I like that. >> That's good. >> Cool. These are awesome. So in the show notes, we'll list all the things you showed, which is great that you took notes, so we can easily do that. >> I already have them written down. >> Excellent. >> Yeah. >> All of these things are shipping today and many had been in the product for quite some time. >> Yeah. >> Cool. >> The little things that you know about. >> We should do more of this. >> Yes. >> Let's do more of these. >> Okay. >> All right. >> Thanks for having me on the first place. This is fun. >> Awesome. Thank you. Hope you guys enjoyed that, and we will see you next time on Visual Studio Toolbox. [MUSIC]
Info
Channel: Microsoft Visual Studio
Views: 44,590
Rating: undefined out of 5
Keywords:
Id: lKtwxz35P5M
Channel Id: undefined
Length: 28min 50sec (1730 seconds)
Published: Thu May 30 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.