April 20th, 2022

Introducing a New Way to Search Your Code and Visual Studio Features

Denizhan Yigitbas
Product Manager

All developers search within their code, in one way or another. Some might use code search to explore their code and understand how some components work; others might use code search to get to a very specific location they have in mind. Either way, as a developer yourself, sometimes this process of searching and finding a location might be frustrating and take you longer than you might want. Visual Studio 17.2 Preview 3 introduces a brand-new All-In-One search experience that merges the existing VS Search (Ctrl + Q) and Go To (Ctrl + T) to allow you to search both your code and Visual Studio features quicker and easier than ever, all in the same place. The All-In-One search streamlines your searching experience by providing you with a customizable UI (size, location, and dismissibility), compact search results with real-time matching as you type, and a fully keyboard friendly interface to ideally minimize your searching pain points. To try it out, download Visual Studio 17.2 Preview 3 today!

An animated GIF showing how the new All In One search experience works overall

Search for code or Visual Studio features!

The new All-In-One search provides users with a tab for code searching where you can search for symbols in your code and a tab for Visual Studio feature searching to navigate the IDE easier.

What is symbol search?

Symbol searching is a quick and easy way to navigate your loaded code. Unlike search tools like Find-in-Files, a symbol search will not search for all text matches in your code. Instead, it will look up symbol definitions. For example, you can go to the exact location where a class, method, function, variable, etc. is defined instantly. Furthermore, your search results will not be cluttered with matches in text matches such as comments, string literals, etc.

What is Visual Studio feature search?

Visual Studio can sometimes get overwhelming with all of the tools and functionalities it provides. So much so that sometimes, you don’t even know where these tools exist, or you find yourself digging through lots of menus just to find where something is the IDE. The Feature Search tab in the All-In-One Search experience allows you search for Visual Studio menus, options, components, and templates. For example, I can easily launch the Solution Explorer or even search for Git functionalities all within this search experience. It’s now easier to achieve exactly what you want without the need to navigate through various menus!

An animated GIF demonstrating Visual Studio feature search in the new All In One search experience

How to use All-In-One Search

To enable the new preview feature, go to Tools > Options > Environment > Preview Features > New Visual Studio Search Experience. After restarting, you will now be able to open the All-In-One Search either with your mouse or through keyboard shortcuts

Entry Point

To open the All-In-One Search experience with your mouse, click the split button at the top of your IDE next to the “Help” menu item. Clicking the dropdown arrow will present you with two different search options: Code Search and Feature Search. Selecting either one of these options will open All-In-One Search in the respective tab. You can also simply click the “Search” button, which will open the most recently selected tab from the drop-down options.

Screenshot of Visual Studio showing the visual entry into the All In One Search

Once the window is open, you can either click between the different tabs, or you can use Ctrl + Tab or the assigned keyboard shortcuts of Ctrl + T and Ctrl + Q to switch between the code search and feature search tabs.

Code searching in All-In-One Search

As we briefly explained above, the All-In-One code searching experience provides you with a symbol searching experience. In addition to symbols across your solution, you can also search for files. The three code results include:

  • Files: Search for any file type located anywhere in your loaded code in VS
  • Types: Search for definitions of classes, interfaces, enums, and types
  • Members: Search for definitions of members defined in classes and types

You can filter down your results using the files, types, and members toggle buttons in the search window:

A screenshot of Visual Studio's All-In-One search window highlighting the files, types, and members filter toggle buttons

You can access these filters without using your cursor, too. By prefixing your search query with “f:”, “t:”, or “m:”, you will be able to get the same behavior as selecting one of the filter buttons.

Customize your experience

The All-In-One search experience is a lightweight popup window in your IDE. You can customize the experience by resizing and moving the window as you desire. You can even further customize this experience by either using the search popup in an easily dismissible, type-and-go form or a sticky form.

To use the All-In-One Search in an easily dismissible, type-and-go form, make sure the “Keep search window open” checkbox is unchecked. In this experience, simply selecting a result (via keyboard enter or mouse-click), clicking outside of the window, or pressing esc will cause the window to dismiss.

To use the All-In-One Search in a sticky form, make sure the “Keep search window open” check is checked. Now, unless you actively press the “x” in the top right corner of the window, the window will remain in front of your editor even if you click away, type in the editor, or select a result. This functionality can even enable you to drag the search window onto a different monitor so you can code on one screen and search on another!

Screenshot of All In One Search highlighting how to make the window sticky and stay on top of the editor

Try it out and share your feedback!

In order to try the new All-In-One Search experience, please download Visual Studio 2022 Preview 3

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 this suggestion ticket and leave comments with any thoughts!

 

Author

Denizhan Yigitbas
Product Manager

Denizhan is a Program Manager on the Visual Studio editor team, focusing on code search and navigation experiences that aim to increase developer productivity.

21 comments

Discussion is closed. Login to edit/delete existing comments.

  • Michael Keller

    Just in case someone wants to change the shortcut mapping:
    The command in Visual Studio’s Keyboard settings is called “Edit.GoToAll” to open the Code Search. For me it didn’t even had a shortcut set after activating this feature.

  • Partha Mandayam

    PLease correct the typo
    click the split button at the top of your IDE next to the “Help” menu item.
    It should be Search button not split button. There is no split button

  • 俊清 林

    Why change the old prefix “f ” to “f:”? The space key is quite efficient.

  • Stelios Adamantidis · Edited

    Ok here comes the tough question: when do you plan to add incremental search across all files with preview like most modern IDEs do? VS 2030? 😁

    Oh well, until then, I will open VS only for the good old Winforms designer…

    • Denizhan YigitbasMicrosoft employee Author

      Hey Stelios! Can you refer me to an example of what you mean?

      • Stelios Adamantidis

        For the record (and for the others to see) I replied and for some reason my comment is still awaiting moderation. It’s fine for me as long as you read my feedback and understand what I mean even if you don’t decide to publish it.

        Cheers.

      • Stelios Adamantidis

        Hello Denizhan, sure by all means!

        What I mean is the "Ctrl + Shift + F" dialog shows the results in real time, as you type. You don't have to press any "Find" extra button. Unless you want to of course. But most of the times I find what I am looking for in the first 10 lines of the results. I only need to click on "Open in Find Window" when I want to see...

        Read more
      • Denizhan YigitbasMicrosoft employee Author

        Hey Stelios!

        Really love this feedback and its actually an area I’m looking into right now! Would love to chat more about some of my ideas and thoughts with you. If interested, feel free to DM me on twitter!

        https://twitter.com/__denizhan__

  • Chuck Ryan

    I am beginning to wonder if the VS team works on anything other than adding new searches.

    Personally I consider having to resort to searching for features as a failure of the UI design and the constant use of modal dialogs, that you often cannot copy text to the clipboard from, as poor/lazy coding.

  • MgSam

    I don't understand what is wrong the current search? (CTRL + ,) is GoToEverything isn't it? I normally use that. In the extremely rare instances I need to search for a VS feature the existing search box in the title bar is fine to select manually. We don't need a keyboard shortcut to help us search for keyboard shortcuts. :)

    When what I'm searching for isn't a symbol, I still need to use Find (CTRL +...

    Read more
    • Daurin Greik · Edited

      I have no complaint with the additional layout functionality proposed (e.g. docking and moving the window around), but can those not be achieved without losing the 'hiding in the corner' and 'initially little more than a text-box' layout option? I really love knowing exactly where this transient piece of UI will be when I tap Ctrl-, and it takes up no more space than it needs to and it goes away the moment I no...

      Read more
    • Denizhan YigitbasMicrosoft employee Author

      Hey there! Thanks for the feedback.

      So when the blog is referring to Ctrl + T, it is actually referring to Ctrl + , as well. They both map to GoToEverything. So this experience should be replacing the Ctrl + , flow as well.

      We are also looking into making this modal a dockable tool window in the future so you can get the tabbed behavior you are mentioning. We appreciate this feedback 🙂

  • Peter Flannery

    Would prefer if visual studio just follows how vscode has implemented its search.
    Where everything “user project related” is located in a simple collapsible sidebar (open-editors or tabs, project explorer, search, git, tests, etc…).
    Also searching the ide and it’s command tools are separate from the user project

    • Denizhan YigitbasMicrosoft employee Author

      Hey Peter! Thanks for this feedback. The search provided by VSCode on the left hand side is purely a text based search where as this is more of a symbol search. VSCode has a command palette search for symbols (Ctrl + T) that is a dropdown experience in the center of the screen. I would be interested to hear what you think about that. Do you use this tool or only the search tab on...

      Read more
      • Frederik Riboe Olsen · Edited

        While I'm not Peter, I would just like to add my two cents.

        I'm very much looking forward to giving this new search experience a try, once it's out of preview. It looks very nice.

        I think adding something like the Command Palette from VS Code to VS would be absolutely amazing. In fact, I think it's the single best feature that could be added to VS.
        The convenience of quickly and easily performing just about any...

        Read more
      • Denizhan YigitbasMicrosoft employee Author

        Thanks for joining the conversation Frederik! The goal of this new search experience is actually exactly along these lines. You can perform all of these actions within the Feature tab! Excited to hear what you think when you give this search experience a try 🙂

  • Muhammad Miftah

    This is nice to have out of the box now, but why create yet more keyboard shortcuts and not enhance the already existing CTRL+comma UI?

    • Denizhan YigitbasMicrosoft employee Author

      Selam Muhammad!

      Ctrl + T and Ctrl + Comma should both be mapping into this new UI actually as they are the same keyboard shortcut actually. You should be able to try this out with Ctrl + Comma! Let me know if that works for you.

    • Jiří Zídek

      YES ! Ability to filter results just by writing and ability to specify “exclude”.