Set "Find and Replace" as Default Search in Visual Studio

Full article

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 2014-07-24 09_54_49-VisualStudio2013FindBox](https://grantwinney.com/content/images/2014/07/2014-07-24-09_54_49-VisualStudio2013FindBox.png)

The second, accessible using Ctrl+Shift+F, is a more “standard” one, with ample spacing and utilizing the famili2014-07-24 13_04_21-VisualStudio2013FindReplaceBox](https://grantwinney.com/content/images/2014/07/2014-07-24-13_04_21-VisualStudio2013FindReplaceBox.png)

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.

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! 2014-07-25 11_12_23-VisualStudio2013FindReplaceShortcutWarning](https://grantwinney.com/content/images/2014/07/2014-07-25-11_12_23-VisualStudio2013FindReplaceShortcutWarning.png)

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. 2014-07-25 11_13_49-VisualStudio2013FindReplaceShortcuts](https://grantwinney.com/content/images/2014/07/2014-07-25-11_13_49-VisualStudio2013FindReplaceShortcuts.png)

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 –2014-07-24 13_04_21-VisualStudio2013FindReplaceBox](https://grantwinney.com/content/images/2014/07/2014-07-24-13_04_21-VisualStudio2013FindReplaceBox.png)

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 diareplaceinfiles visualstudio](https://grantwinney.com/content/images/2014/07/replaceinfiles-visualstudio.png)

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).

Author

Grant Winney

I write when I've got something to share - a personal project, a solution to a difficult problem, or just an idea. We learn by doing and sharing. We've all got something to contribute.


Comments / Reactions