Get more done with search in Visual Studio

Mads Kristensen

Over the years, the Search feature in Visual Studio has gotten faster and more capable. You might have missed some of the things it can do to help you be more productive and get the most out of Visual Studio. So, let’s take a closer look at how you can use Search in your daily work.

I hit Ctrl+Q to use Search every single day and have for years. It’s useful, it’s fast, and it helps me get my job done. Usage data shows that I’m an outlier and that most Visual Studio users don’t use Search as much as me. So, I thought it write up some of the ways I use Search to be more productive and share it with you here on the blog.

Windows and panels

You can search for windows or panels that you may have accidentally closed. For example, search for test to find and open the Test Explorer window:

Image Picture1

I do this all the time with some of the custom tool windows provided by the various Visual Studio extensions I use.

In addition to searching the IDE itself, Visual Studio search also searches your solution items for filename, code, method, and other matches. In the following screenshot, a search for markdown has found the MarkdownMetaExtractor.cs file, the MarkdownMetaExtractor class, and two methods within the solution:

Image Picture3

You can also do a “camel hump” search. In the following screenshot, a search for FSS has found a FolderSizeScanner file, class, and method:

Image Picture4

I used to use Go To All… (Ctrl+,) to find files in my solution, but now I just use the Search instead. I find it easier to use just a single place for searching.

Execute commands

You can use the Visual Studio search box to find menu items and commands. For example, search for clean sol to quickly find and execute the Clean Solution command. The search results also offer a reminder of where to find this command in the menus as shown in the screenshot below:

Image Picture5

This one is particularly useful for commands you don’t remember the keyboard shortcut for. So, instead of reaching for the mouse to find it, simply hit Ctrl+Q and start typing.

Find options

You can use the Visual Studio search box to find settings, options, and similar configuration items. For example, search for change theme to quickly find and open the dialog that allows you to change the Visual Studio color theme as shown in the following screenshot:

Image Picture6

Visual Studio has a lot of settings. Like, a lot. And going through the Options dialog to find the setting can take a while if you don’t remember exactly where to go. Using Search for finding settings has completely changed how I interact with the Options dialog and has made it easier for me to toggle settings on/off more frequently as needed.

Most recently used

Before you start typing anything in the Search field, a list of your most recently used search results are shown. It’s a great reminder to start learning those keyboard shortcuts instead of searching for them commands all the time. That way, without searching at all, you can get to the three most recent results easily.

Image Picture0

That’s my list of useful things I use search for in Visual Studio. I hope you find it useful too. Make sure to catch other tips and tricks videos and subscribe to the Visual Studio YouTube channel.