Anders Rune Jensen
Anders Rune Jensen

Reputation: 3806

Disable search selection in Visual Studio

Does anyone know if its possible to disable the search in "Selection" option when searching in Visual Studio?

I find the search selection really confusing and I never want to search in a selection. Ever! I often copy some code by selecting it first, and then I do a search for something to go and paste the code in, but Visual Studio then by default searches in the selected text, which is not what I want.

I'm interested in a solution that works in at least Visual Studio 2010 and 2012, but 2008 would also be nice.

Upvotes: 40

Views: 5322

Answers (2)

Eske Rahn
Eske Rahn

Reputation: 1226

It has (Finally!!!) been fixed with an option. Following the vote link from acarlon :

In Visual Studio 2015, you can prevent Visual Studio from automatically switching to search in Selection scope by unchecking the following tools-option:

Tools-Options-Environment-Find and Replace-Automatically limit search to selection

Great that the option is only on the automation . So in the (for me extremely rare) cases where the functionality could be handy it is still possible by explicitly selecting the scope "Selection"

ADD: As Lexikos points out in comment, the option of "Selection" is actually quite handy with "Replace", especially "Replace All"

Upvotes: 46

acarlon
acarlon

Reputation: 17272

There is no option currently, but you can vote for the option to disable it here

Upvotes: 9

Related Questions