Visual Studio 2022 Preview Enables Code Editing in Search Results — Visual Studio Magazine

0

New

Visual Studio 2022 Preview enables code editing in search results

In the latest preview of Visual Studio 2022, developers can edit source code from all-in-one search results.

This is the latest search enhancement from the development team, who in April revamped the IDE’s search experience in a VS 2022 v17.2 preview that introduced all-in-one search, providing a one-stop, lightweight, customizable, and easily removable search. popup, which can be kept open and even moved to another monitor for an easier search/coding experience.

“The new search experience includes a symbol search to search for filenames, types (including classes, interfaces, enumerations, and types), and members (methods and properties within a class) as well than a feature search to find things related to Visual Studio features,” Microsof said at the time. “You can enjoy an instant real-time answer search experience with a customizable (size, location, and rejection) and fully keyboard-friendly user interface.”

In VS 2022 v17.3 Preview 2, new functionality is delivered through pop-up code previews, which allow developers to preview and make changes to search results in the search pop-up window, mimicking an experience of full editor. For example, beyond code changes, it helps developers differentiate between symbols with similar names and take advantage of editor features such as “Find All References”.

“The additional context provided by Code Preview will allow you to differentiate between search results in seconds, making it easier than ever to find exactly what you’re looking for,” said Denizhan Yigitbas, product manager, in a blog post from June 27. “With the ability to edit code directly from the search window, you’ll be able to stay focused on your code and quickly make changes using the same experience you know and love in Visual Studio’s full-featured editor. You get full IntelliSense support, quick actions, refactorings, and more, without ever having to leave the search interface.”

Editing search results in an animated action
[Click on image for larger, animated GIF view.] Editing search results in an animated action (source: Microsoft).

Customization of the UI display is also available, as developers can switch between icons displayed at the top of the search window to display results above the code in a vertical configuration or to the right of the code in a horizontal configuration. A third option completely disables code previews.

The new search experience can be activated from the top menu: Tools > Options > Environment > Preview Features > New Visual Studio Search Experience.

We put the new all-in-one search feature to the test last week Visual Studio Magazine article “Hands-on with the latest preview features in Visual Studio 2022”, as well as audio cues.

About the Author


David Ramel is an editor and writer for Converge360.



Share.

Comments are closed.