Visual Studio 2013 provides two search boxes, similar in functionality but differing considerably in design.
The first one, accessible using
Ctrl+F, is minimalist, pushed into the corner with all the controls packed together as tightly as possible.
The second, accessible using
Ctrl+Shift+F, is a more “standard” one, with ample spacing and utilizing the familiar popup dialog box.
I imagine this is part of the ongoing effort to keep things “flattened” and maintain focus in the current screen (consider Peek Definition and the scrollbar’s Preview Tooltip).
But I no like. It’s awkward to use. The options are too close. The box is too small. I aim for the tiny drop-down arrow in the upper-right and either perform a premature search, or inadvertently close the @#$%! search box.
How to make the “Find in Files” tab of the classic “Find and Replace” popup the default
You can change the shortcuts for these search boxes, so the more traditional search box pops up with Ctrl+F.
- Open up Tools / Options and select the Environment / Keyboard tab in the dialog box.
- Type “find” in the “Show commands containing” dialog box to filter the commands in the list box.
- You’ll see two options:
- “Edit.Find” is the default, docked search box.
- “Edit.FindinFiles” is the alternative search box, closer to the traditional search box.
Select “Edit.FindinFiles”, place the cursor in “Press shortcut keys:”, and press
Ctrl+F. It’ll remind you that it’s in use by the other “Find” dialog. Don’t care! “Assign” that sucka.
Since you can have multiple shortcuts for a single option, both shortcuts now open the “Find” dialog window. You can select “Edit.Find” and apply the other shortcut to it if you still want to be able to access it. Personally, I don’t.
How to make the “Replace in Files” tab of the classic “Find and Replace” popup the default
But what if most of the searches you perform are for the purposes of replacing text, not just finding it?
The instructions above show you how to default to the “Find in Files” tab of the classic “Find and Replace” popup, but note the other tab – “Replace in Files”.
Instead of searching for “FindinFiles” in the keyboard settings, do a search for “ReplaceinFiles”. On my system, it’s assigned to “Ctrl+Shift+H” by default.
Following the same instructions as above, you can map it to “Ctrl+F”, and make the more classic search/replace dialog box the default.
And, since keyboard settings are synchronized in VS2013 (if you’re logged in), this setting will be reflected in all environments on all your development machines (you’ll have to restart any current VS sessions to see the change).