Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make Visual Studio Replace default to Current Selection?

In Visual Studio 2015 I'm having problems with the Ctrl+H shortcut. In the past if I had text selected and pressed the key combo, the replace box defaults to 'Selection'. But now it's defaulting to 'Current Document'. If I change it to 'Selection' it does not retain that setting next time I Ctrl+H

I'm not sure if I've accidentally changed a setting, or if it's always been like this since I installed the 2015 version

like image 476
Clyde Avatar asked Feb 05 '16 15:02

Clyde


People also ask

How do I replace all 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).

How do I create a new line in Find and Replace in Visual Studio?

Today I learned How to find and replace with a newline in Visual Studio Code. In the local searchbox ( Ctrl + F ) you can insert newlines by pressing Ctrl + Enter . If you use the global search ( Ctrl + Shift + F ) you can insert newlines by pressing Shift + Enter .


1 Answers

You can go to Tools > Options then in the TreeView, expand the Environment node, and choose Find and Replace and check the box Automatically limit search to selection

like image 62
golgothan3 Avatar answered Sep 21 '22 11:09

golgothan3