{"id":230910,"date":"2020-10-26T08:00:44","date_gmt":"2020-10-26T15:00:44","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=230910"},"modified":"2020-10-20T13:49:14","modified_gmt":"2020-10-20T20:49:14","slug":"get-more-done-with-search-in-visual-studio","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/get-more-done-with-search-in-visual-studio\/","title":{"rendered":"Get more done with search in Visual Studio"},"content":{"rendered":"<p>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\u2019s take a closer look at how you can use Search in your daily work.<\/p>\n<p>I hit <strong>Ctrl+Q<\/strong> to use Search every single day and have for years. It\u2019s useful, it\u2019s fast, and it helps me get my job done. Usage data shows that I\u2019m an outlier and that most Visual Studio users don\u2019t 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.<\/p>\n<p><iframe src=\"https:\/\/www.youtube-nocookie.com\/embed\/5QneJt5TzNQ\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<h2>Windows and panels<\/h2>\n<p>You can search for windows or panels that you may have accidentally closed. For example, search for <strong>test<\/strong> to find and open the Test Explorer window:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture1.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-230904\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture1.png\" alt=\"Image Picture1\" width=\"536\" height=\"257\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture1.png 536w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture1-300x144.png 300w\" sizes=\"(max-width: 536px) 100vw, 536px\" \/><\/a><\/p>\n<p>I do this all the time with some of the custom tool windows provided by the various Visual Studio extensions I use.<\/p>\n<h2>File search<\/h2>\n<p>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 <strong>markdown<\/strong> has found the <strong>MarkdownMetaExtractor.cs<\/strong> file, the <em>MarkdownMetaExtractor<\/em> class, and two methods within the solution:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture3.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-230905\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture3.png\" alt=\"Image Picture3\" width=\"531\" height=\"287\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture3.png 531w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture3-300x162.png 300w\" sizes=\"(max-width: 531px) 100vw, 531px\" \/><\/a><\/p>\n<p>You can also do a &#8220;camel hump&#8221; search. In the following screenshot, a search for <strong>FSS<\/strong> has found a <strong>F<\/strong>older<strong>S<\/strong>ize<strong>S<\/strong>canner file, class, and method:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture4.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-230906\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture4.png\" alt=\"Image Picture4\" width=\"536\" height=\"204\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture4.png 536w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture4-300x114.png 300w\" sizes=\"(max-width: 536px) 100vw, 536px\" \/><\/a><\/p>\n<p>I used to use <em>Go To All<\/em>\u2026 (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.<\/p>\n<h2>Execute commands<\/h2>\n<p>You can use the Visual Studio search box to find menu items and commands. For example, search for <strong>clean sol<\/strong> 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:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture5.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-230907\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture5.png\" alt=\"Image Picture5\" width=\"532\" height=\"160\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture5.png 532w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture5-300x90.png 300w\" sizes=\"(max-width: 532px) 100vw, 532px\" \/><\/a><\/p>\n<p>This one is particularly useful for commands you don\u2019t remember the keyboard shortcut for. So, instead of reaching for the mouse to find it, simply hit <strong>Ctrl+Q<\/strong> and start typing.<\/p>\n<h2>Find options<\/h2>\n<p>You can use the Visual Studio search box to find settings, options, and similar configuration items. For example, search for <strong>change theme<\/strong> to quickly find and open the dialog that allows you to change the Visual Studio color theme as shown in the following screenshot:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture6.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-230908\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture6.png\" alt=\"Image Picture6\" width=\"533\" height=\"203\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture6.png 533w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture6-300x114.png 300w\" sizes=\"(max-width: 533px) 100vw, 533px\" \/><\/a><\/p>\n<p>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\u2019t 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.<\/p>\n<h2>Most recently used<\/h2>\n<p>Before you start typing anything in the Search field, a list of your most recently used search results are shown. It\u2019s 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.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture0.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-230903\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture0.png\" alt=\"Image Picture0\" width=\"842\" height=\"388\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture0.png 842w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture0-300x138.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/10\/Picture0-768x354.png 768w\" sizes=\"(max-width: 842px) 100vw, 842px\" \/><\/a><\/p>\n<p>That&#8217;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 <a href=\"https:\/\/www.youtube.com\/playlist?list=PLReL099Y5nRc-zbaFbf0aNcIamBQujOxP\">tips and tricks videos<\/a> and subscribe to the <a href=\"https:\/\/www.youtube.com\/user\/visualstudio\">Visual Studio YouTube channel<\/a>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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\u2019s take a closer look at how you can use Search in your daily [&hellip;]<\/p>\n","protected":false},"author":642,"featured_media":230904,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[1404,287],"class_list":["post-230910","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-search","tag-tips-and-tricks"],"acf":[],"blog_post_summary":"<p>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\u2019s take a closer look at how you can use Search in your daily [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/230910","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/642"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=230910"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/230910\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/230904"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=230910"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=230910"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=230910"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}