Quick Find extension in the Productivity Power Tools
We’re pleased to announce a new Quick Find (Ctrl+F) extension in the February release of the Productivity Power Tools. This is the first version of the Quick Find extension and we are planning to make some improvements to it in future Power Tools releases, but this blog post describes the reasons for the extension, its functionality, where we’re planning to take it in future versions, and how to send us feedback.
Why make a Find extension?
Find is a feature that is used day in and day out by the vast majority of developers, and yet the built-in Find dialog leaves something to be desired. In fact, Find is the code editor feature that generates the most suggestions on Connect and has for several versions. We haven’t made significant changes to Find since VS 2005 and felt that with the Productivity Power Tools, the time was right to act on your feedback.
Our overarching goal is that unlike VS 2010 Find/Replace, the Power Tools Quick Find/Replace should be lightweight, quick, and simple.
VS 2010 Find
Power Tools Find
|Covers too much code||Occupies very little space|
|Jumps around during searches||Remains stationary|
|No immediate results||Uses an incremental search for nearly instant results|
|Uses outdated regular expression syntax||Uses familiar .NET regular expression syntax|
What can it do today?
Basic Quick Find/Replace
Pressing Ctrl+F will invoke the extension’s Quick Find. Incremental Search users will also notice that Ctrl+F and Ctrl+I are one and the same – our hope is that the extension is fast and light enough to replace the built-in Incremental Search. The UI should always sit in the upper right corner of the editor and includes, from left to right: toggle to switch to Replace, Find What box, Find Previous button, Find Next button, and Close button. It looks like this:
Pressing Ctrl+H will invoke the extension’s Quick Replace. Its UI has everything from Find plus a Replace With box, Replace Next button, and Replace All button. It looks like this:
Results are found incrementally and all matches are highlighted almost instantaneously in the editor. The default highlight color is yellow and is customizable through Tools->Options->Environment->Fonts and Colors->Find Highlight (Extension). The Enhanced Scrollbar extension, also new in this power tools release, also displays markers that show where all of the results are in your file. These are orange by default and customizable through Tools->Options->Productivity Power Tools->Enhanced Scroll Bar->Find results color.
Find History and Options
The Quick Find extension also includes a search history and common options in the Find What dropdown box:
The “Use Regular Expression” option has also received a long-awaited update: it now uses .NET regular expressions! This is one of the most common requests we receive for the Find dialog, so we’ve added it to the extension’s Quick Find. We are also hoping to update the regular expressions in the built-in Find in Files dialog; that part is much harder to do via extensibility and is not available yet, but it is on our to-do list.
Clicking “Advanced Options…” or pressing Ctrl+Shift+F will take you to the built-in Find in Files dialog. To reach the built-in Quick Find, just go to Find in Files and press Ctrl+F. Similarly, you can reach Replace in Files with Ctrl+Shift+H and Quick Replace with Ctrl+Shift+H, Ctrl+H.
Last but definitely not least, there is a “Send Feedback…” link at the bottom of the Find What dropdown. This allows you to directly e-mail the team that built this extension, including the developer, tester, and program manager. We read every e-mail and are already planning an update to the extension based on your feedback. We would love to hear from you!
Where is the extension going in the future?
Based on your feedback and our bug backlog and ’wish list’ of mini-features to add, we’re planning an update to the Find extension in the next Pro Power Tools release. This is not an exhaustive list and not all of these will make it into the very next version, but we’ve highlighted the top issues we hope to address.
Find in more scopes
By far the #1 piece of extension feedback so far is about scope. The current version of the extension always uses the current document or window as its scope, but you can still do a find in selection, current project, entire solution, etc. by going to Find in Files (Ctrl+Shift+F) or, for selection and current block, the built-in Quick Find (Ctrl+Shift+F, Ctrl+F). We have heard loud and clear that being able to search in other scopes is critical and we’ll be working that into Quick Find in the next Pro Power Tools update (release date still TBD – watch this blog for news!).
More complete keyboard support
We also knew when we released this extension that its keyboard support is not yet complete, and that’s something we plan to address. This includes:
- Keyboard shortcuts for everything: Some buttons (Find Previous, Find Next, Close) already have shortcuts, but we plan to add them for the rest of the buttons (including Replace Next and Replace All) and for the search options.
- Keyboard navigation of the dropdown: There is a known bug where Alt+DownArrow will correctly open the history/options dropdown but the arrow keys won’t do anything after the dropdown is open. And when the dropdown is closed, the unmodified arrow keys should cycle through your search history. We’re planning to fix both of these issues in the future.
- Tab/Shift+Tab navigation: Several of you have noted that it takes three tabs to get from the Find What box to the Replace With box. We’re reducing this to a single tab in the next version. We also intend to fix the known bug that prevents Shift+Tab from moving out of the Find What and Replace With boxes.
Number of Matches
After you’ve done a search, we plan to add an overlay that says “x of y” (but with numbers), where x is your current match and y is the total number of matches. This should also make it clearer when there are no matches and when your search passes the end of your document.
Send us feedback!
We’re prioritizing our idea list and adding new suggestions to that list based on your feedback, so we would love to hear from you! Positive and negative comments, mini-feature suggestions and bug reports, and any other thoughts you have are more than welcome. And if you choose to disable the extension (Tools->Options->Productivity Power Tools->All Extensions), we would ask that you send us a quick e-mail so we know why and can hopefully address your concerns in a future version. Just use the “Send Feedback” link in the Find dropdown or contact us directly at VsFindFeedback@microsoft.com.
Program Manager, Visual Studio Editor team & Quick Find extension