{"id":238580,"date":"2022-06-27T11:31:15","date_gmt":"2022-06-27T18:31:15","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=238580"},"modified":"2022-06-28T14:53:56","modified_gmt":"2022-06-28T21:53:56","slug":"sneak-peek-and-edit-your-code-while-you-search","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/sneak-peek-and-edit-your-code-while-you-search\/","title":{"rendered":"Sneak Peek and Edit Your Code While You Search"},"content":{"rendered":"<p>Throughout Visual Studio 2022 Previews, we&#8217;ve been releasing a series of changes to the way you go about searching code in the IDE using the new All-In-One Search:<\/p>\n<ul>\n<li>VS 2022 17.1 Preview 1: <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/code-search-in-visual-studio-is-about-to-get-much-faster\/\">Indexed Find in Files<\/a><\/li>\n<li>VS 2022 17.2 Preview 3: <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/introducing-a-new-way-to-search-your-code-and-visual-studio-features\/\">The New All-In-One Search<\/a><\/li>\n<li>VS 2022 17.3 Preview 1: <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/all-in-one-search-is-getting-slicker\/\">All-In-One Search UI Cleanup<\/a><\/li>\n<\/ul>\n<p>Now, in 17.3 Preview 2, we\u2019re releasing a new feature to the new All-In-One Search to help you search and interact with code more efficiently: Contextual Code Previews. This new code preview introduces the ability to not only preview your code search results, but also make edits to your code all within the All-In-One Search UI (use\u00a0<em>Ctrl<\/em>+<em>t<\/em>\u00a0or\u00a0<em>Ctrl<\/em>+<em>q<\/em>\u00a0to launch). The additional context provided by the code preview will allow you to differentiate between search results within seconds, making it easier than ever to find exactly what you\u2019re looking for. With the ability to edit code right from the search window, you\u2019ll be able to stay focused on your code and quickly make changes using the same experience you\u2019ve come to know and love in the full Visual Studio editor. You\u2019ll find full support for IntelliSense, Quick Actions, refactorings, and more without ever needing to leave the search UI.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/AIOSearch_Code_Preview_Demo-3.gif\" \/><\/p>\n<h4>Full Editor Experience all within the search UI<\/h4>\n<p>The code preview in the search UI intends to provide you a full editor experience. This means that you can not only differentiate similarly named symbols, but also make changes to your code. Enjoy some of your favorite editor features including IntelliSense, refactor, find all references, and more, all without leaving the search window.<\/p>\n<h4>Configurable Experience<\/h4>\n<p>We know that every developer has a unique setup that optimizes their development experience. Some might prefer ultra-wide screens, and some might prefer portrait mode screens. For this reason, the code preview has 3 various configurations:<\/p>\n<ul>\n<li><strong>Vertical Configuration:<\/strong> Select the vertical split icon located at the top right of the search window. Code Preview will be below the results section.<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-238582\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-email.png\" alt=\"Screenshot of vertical configuration of code previews\" width=\"1661\" height=\"1506\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-email.png 1661w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-email-300x272.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-email-1024x928.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-email-768x696.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-email-1536x1393.png 1536w\" sizes=\"(max-width: 1661px) 100vw, 1661px\" \/><\/p>\n<ul>\n<li><strong>Horizontal Configuration:<\/strong> Select the horizontal split icon located at the top right of the search window. Code Preview will be to the right of the results section.<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-238583\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-descr.png\" alt=\"Screenshot of horizontal configuration of code previews\" width=\"2300\" height=\"1137\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-descr.png 2300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-descr-300x148.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-descr-1024x506.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-descr-768x380.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-descr-1536x759.png 1536w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-descr-2048x1012.png 2048w\" sizes=\"(max-width: 2300px) 100vw, 2300px\" \/><\/p>\n<ul>\n<li><strong>No Code Preview:<\/strong> Toggle either icon to disable code previews.<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-238584\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-email-1.png\" alt=\"Screenshot of no code preview\" width=\"1764\" height=\"1037\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-email-1.png 1764w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-email-1-300x176.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-email-1-1024x602.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-email-1-768x451.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/graphical-user-interface-text-application-email-1-1536x903.png 1536w\" sizes=\"(max-width: 1764px) 100vw, 1764px\" \/><\/p>\n<h2>Try it out and share your feedback!<\/h2>\n<p>To try the new code preview experience in the All-In-One Search, please download Visual Studio 2022 Preview<\/p>\n<p><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\" target=\"_blank\">Download Visual Studio Preview<\/a><\/div><\/p>\n<p>To enable the new search experience, go to <strong>Tools &gt; Options &gt; Environment &gt; Preview Features &gt; New Visual Studio Search Experience.<\/strong> We would love to get your feedback on the new search experience so please give it a try and let us know what you think! You can share any feedback via <a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Improve-Visual-Studios-New-Global-Searc\/10017760?space=8&amp;entry=suggestion\">this suggestion ticket<\/a> and leave comments with any thoughts!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Throughout Visual Studio 2022 Previews, we&#8217;ve been releasing a series of changes to the way you go about searching code in the IDE using the new All-In-One Search: VS 2022 17.1 Preview 1: Indexed Find in Files VS 2022 17.2 Preview 3: The New All-In-One Search VS 2022 17.3 Preview 1: All-In-One Search UI Cleanup [&hellip;]<\/p>\n","protected":false},"author":78633,"featured_media":228872,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[],"class_list":["post-238580","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio"],"acf":[],"blog_post_summary":"<p>Throughout Visual Studio 2022 Previews, we&#8217;ve been releasing a series of changes to the way you go about searching code in the IDE using the new All-In-One Search: VS 2022 17.1 Preview 1: Indexed Find in Files VS 2022 17.2 Preview 3: The New All-In-One Search VS 2022 17.3 Preview 1: All-In-One Search UI Cleanup [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/238580","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\/78633"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=238580"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/238580\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/228872"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=238580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=238580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=238580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}