17.9 Preview 3 brings exciting changes to Code Search
With the release of 17.9 Preview 3 dropping today, we are bringing some exciting enhancements to the Code Search (also known as All-In-One Search) experience. Since our last update with the search experience, we’ve been hard at work refining the experience and ideating ways to add to the experience. Now, you can search for any word or string of characters across your solution, supplementing file and symbol results from your codebase. You can now search for local variable names, words in comments, parameter names, or any other string of characters across your codebase.
The added text support will help round out your experience using Code Search. If you’re looking for a more specialized text search experience, Find in Files (Ctrl+Shift+F) and Quick Find (Ctrl+F) have more options and functionality.
Where can I find these?
The default Code Search experience (Ctrl+T or Ctrl+,) will include exact text matches when applicable, including items like comments and local variables that weren’t included before. Text results are deprioritized compared to files, types, and members, so it shouldn’t interfere with your current workflow.
For a text-only view, you can filter down to just text results by doing one of the following:
- Click the “text (x:)” button below the search bow,
- Prefix your search query with “x:”,
- Use the keyboard shortcut `Shift+Alt+F`, or
- Go to the menu option “Edit > Go To > Go To Text”.
In the text-only experience, there are also the options to toggle “Match case”, “Match whole word”, and “Use regular expressions” through the button at the far right of the search bar.
Try it out today and let us know what you think.
Full text support in Code Search is available by default in the Preview channel, starting from 17.9 Preview 2. (Edit: We’ve discovered that the feature may not be fully rolled out by default in Previews channels, but you can still enable it by going to “Tools > Options > Environment > Preview Features > Plain text search in All-In-One Search”).
It will also be available in the main release in version 17.9 as a preview feature, where you can turn it on by going to “Tools > Options > Environment > Preview Features > Plain text search in All-In-One Search”.
We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.