Improving Find & Replace in Visual Studio 11 Beta
In our previous blog post, we introduced the new Find control we are building in Visual Studio. Our goal was to streamline and modernize the vast array of Find experiences and provide a lightweight mechanism to search within documents. With the huge number of responses we received from the Developer Preview, we knew that our top priority for the Beta release was improving the quality of Find. Since the Developer Preview release, we have fixed a large number of customer reported bugs, including replace in selection not working, buttons being disabled in the find dialog, missing wrap alerts, match whole word not working, and more. There still are some rough edges in the Beta Find control, but we are working hard at making Find consistent and reliable for future releases. Along with fixing bugs, we took a hard look at addressing the top customer suggestions. Here are some of the top suggestions reported in the Developer Preview that are now available in Beta:
- Down arrow pops open search options
One of our top feedback complaints was that search options were not discoverable in the new control. Additionally, a number of users requested the ability to scroll through the History using the arrow keys. To enable both of these scenarios, we added the ability to pop open the MRU list by hitting the down arrow key. We hope that this change makes the search options easier to discover.
- Keyboard shortcuts
The support for search option shortcuts was not extensive in the Developer Preview. A number of customers wanted the ability to use the same shortcuts they were familiar with in VS2010 to set their search options. In Beta, you can now use Alt+C to toggle Match case or Alt+E to toggle regular expressions. You can find a full list of shortcuts in my previous post.
- Find control is resizable
Making the Find control resizable was a top customer request for users who work with larger search terms, mostly common in regular expression searches.
- Regular expression builder updates
The new Find supports .NET regular expressions, which has been a longstanding ask from customers. However, users let us know that a number of common (and easy) VS 2010 regular expressions no longer worked in the new Find. In the Beta Find, we have made additions to the Regular expression builder to support some of the missing patterns that you used in VS 2010. Click on the builder menu flyout to access these newly added regular expressions.
- Tab order
Another small but useful change post Developer Preview is the tab order is now consistent with the dialog. This is another change we pursued based off user feedback.
Even with the improvements in the Beta Find control, there are still some noticeable bugs:
- Shared scope and options for Quick Find and Find-in-Files.
One of our top reported bugs is the shared scope and search options for Quick Find and Find in Files. This bug causes the scope and options to be common across the new Find control and the Find dialog. This bug fix, unfortunately, was too risky to release in Beta, but we are addressing it post-Beta. In the meantime, this extension (link below) should fix the issue so you can work with separate scope and search options.
IMPORTANT: The extension provides a workaround for the shared scope & options issue. Please note that this extension can be expected to work correctly only on Beta and should be uninstalled when upgrading to future versions. This extension will not be serviced by Microsoft. If you encounter any issues after installing the extension, please uninstall and restart Visual Studio.
- Closing documents with an active Incremental search session throws COM Exception
There is a bug in Find that causes a COM exception every time a document is closed with an active incremental search. This issue will also be addressed post-Beta. To work around this issue, incremental search should be dismissed before closing documents. ISearch can be dismissed by hitting the Esc key. Once this exception occurs, please re-invoke Find using Ctrl+F and perform a Find Next. This will restore incremental search for future operations.
Finally, we want to thank you all for the great feedback you have been giving us. We are using the feedback to prioritize our work areas and we appreciate you telling us the Find pain-points. Please do continue to send us feedback on the Beta Find experience!