Some times (often on a Monday morning while I’m warming up for the workweek) I feel like sharpening my Visual Studio skills. I found this wonderful stack overflow question about VS keyboard shortcuts.
These three I’m looking forward to adding to my bag ‘o tricks.
3. Collapse/Uncollapse Current Block – CTRL + M
I’m always looking for ways to break down big files!
2. Attach to process – CTRL + ALT + P
If you’re a web dev, you probably do a fair amount of your debugging via attach to process. Strangely, visual studio doesn’t list the attach shortcut next to the menu command. So I guess it was a secret. But now we know.
1. Cycle through open tabs and windows - CTRL + TAB
I can’t believe I didn’t think to try this. It’s pretty common for my workspace to fill up with 30+ tabs. Even more common is for all the visual studio widgets and gizmos to find their way into unexpected places. This shortcut could save me serious time mousing around through the labyrinth of visual studio menus.
Three that I currently use a lot:
3. Find in files - CTRL + SHIFT + F
2. Back and forth through your cursor history - CTRL + ” – ” and CTRL + SHIFT + ” – “
If you’re frequently switching between files e.g. unit tests, business logic, display code for a feature you can use this feature to navigate between the files you’ve been working on without using the mouse. It’s one of those features that will quickly become second nature.
1. Rapid file open – CTRL + SHIFT + A followed by typing “open [filename]“
I didn’t see this in the SO post, but it’s the shortcut I’m most thankful for. If you are working in a solution with thousands of files, hundreds of folders, and dozens of projects it can be tedious to navigate through the solution explorer to find a certain file. Here’s where the console comes to the rescue. When you use this keyboard combo, the console will either find the file you’re looking for or bring up a list of matches.