Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reset Find and Replace dialogs to Current Document in Visual Studio

Is there a way to force the Find and Replace dialog boxes, in visual studio, to auto select Current Document in the Look in drop down? It should do this only on reopening the dialog. I regularly forget to switch back from entire solution or project and end up wasting a lot of time waiting for VS to search everything including designer files! I'm hoping for a registry hack or something.

I'm sure this is a major annoyance for others too. Any tips on this would be greatly appreciated!

enter image description here

like image 465
Tim Santeford Avatar asked Aug 18 '11 16:08

Tim Santeford


People also ask

How do I replace all instances of word in Visual Studio?

You can find and replace text in the Visual Studio editor by using Find and Replace (Ctrl+F or Ctrl+H) or Find/Replace in Files (Ctrl+Shift+F or Ctrl+Shift+H). You can also find and replace only some instances of a pattern by using multi-caret selection.

How do I replace a file in Visual Studio?

On the Edit menu, expand Find and Replace. Choose Replace in Files. If the Find and Replace window is already open, on the toolbar, choose Replace in Files.

How do I search for a word in all Files in Visual Studio?

The new experience is available by searching for “Find in Files” or “Replace in Files” in Visual Studio search (Ctrl+Q by default). You can also get to these commands with Ctrl+Shift+F and Ctrl+Shift+H respectively.


Video Answer


1 Answers

Visual Studio retains separate settings for dialogs shown using Ctrl+F and Ctrl+Shift+F shortcuts, though dialogs themselves are identical. So when I want to search in current document, I hit Ctrl+F. When I want to search in Project/Solution/directory, I hit Ctrl+Shift+F and then choose where I want to search.

like image 140
Juozas Kontvainis Avatar answered Nov 10 '22 21:11

Juozas Kontvainis