There was a cool comment in my last blog post (one of many, as always, the comments > the content).
Btw, "until I realized that the Solution Explorer tree nodes are searchable." This one is a saver!
The commenter, Sam, noticed a throwaway bit in the middle of the post where I noted that the Solution Explorer was text-searchable. There's a lot of little tricks like this in Visual Studio that even the most seasoned developers sometimes miss. This phenomenon isn't limited to Visual Studio, of course. It's all software! Folks find non-obvious UX all the time in Windows, OSX, iPhone, everyday. If UX were easy then everything would be intuitive but it's not so it ain't. ;)
There's an old joke about Microsoft Office, which is known for having a zillion features.
"Most of the exciting new Office features you discover have always been in Office." - Me and Everyone Else
Here's some exceedingly useful stuff in Visual Studio (It's free to download and use, BTW) that folks often miss.
Search Solution Explorer with Ctrl+;
You can just click the text box above the Solution Explorer to search all the the nodes - visible or hidden. Or, press "Ctrl + ;"
Even stuff that's DEEP in the beast. The resulting view is filtered and will remain that way until you clear the search.
Quick Launch - Ctrl+Q
If there is one feature that no one uses and everyone should use, it's Quick Launch. Someone told me the internal telemetry numbers show that usage of Quick Launch in the single digits or lower.
Do you know that you (we) are constantly digging around in the menus for stuff? Most of you use the mouse and go Tools...Options...and stare.
Just press Ctrl+Q and type. Need to change the Font Size?
Want to Compare Files? Did you know VS had that?
What about finding a NuGet package faster than using the NuGet Dialog?
Promise me you'll Ctrl+Q for a few days and see if you can make it a habit. You'll thank yourself.
Map Mode for the Scroll Bar
I love showing people features that totally surprise them. Like "I had NO IDEA that was there" type features. Try "map mode" in the Quick Launch and turn it on...then check out your scroll bar in a large file.
Your scrollbar will turn into a thumbnail that you can hover over and use to navigate your file!
Most folks manage their tabs like this.
- Open Tab
- Declare Tab Bankruptcy
- Close All Tabs
- Goto 0
But you DO have both "pinned tabs" and "preview tabs" available.
If you pin useful tabs, just like in your browser those tabs will stay to the left and stay open. You can not just "close all" and "close all but this" on a right click, but you can also "close all but pinned."
Additionally, you don't always have to double-click in the Solution Explorer to see what's in a file. That just creates a new tab that you're likely going to close anyway. Try just single clicking, or better yet, use your keyboard. You'll get a preview tab on the far right side. You'll never have more than one and preview tabs won't litter your tab list...unless you promote them.
Navigate To - Ctrl+, (Control+Comma)
Absolutely high on the list of useful things is Ctrl+, for NavigateTo. Why click around with your mouse to open a file or find a specific member or function? Press Ctrl+, and start typing. It searches files, members, type...everything. And you can navigate around with your keyboard before you hit enter.
There's basically no reason to poke around in the Solution Explorer if you already know the name of the item you want to see. Ctrl+, is very fast.
Move Lines with your keyboard
Yes I realize that Visual Studio isn't Emacs or VIM (unless you want it to be VsVim) but it does have a few tiny tricks that most VS users don't use.
You can move lines just by pressing Alt-up/down arrows. I've never seen anyone do this in the wild but me. You can also Shift-Select a bunch of lines and then Alt-Arrow them around as a group.
You can also do Square Selection with Alt and Drag...and drag yourself a nice rectangle...then start typing to type on a dozen lines at once.
Perhaps you knew these, maybe you learned a few things. I think the larger point is to have the five to ten most useful features right there in your mind ready to go. These are mine. What are your tips?
Sponsor: Do you deploy the same application multiple times for each of your end customers? The team at Octopus have been trying to take the pain out of multi-tenant deployments. Check out their 3.4 beta release.
© 2016 Scott Hanselman. All rights reserved.