Jon
Jon

Reputation: 5335

Visual Studio 2015-2019: How do I bring back the old find dialog from VS 2010?

I find the new "quick find" dialog hard to use:

  1. It's difficult to see whether "Match case" or "Match whole word" are selected, especially when the editor is in focus.
  2. I find "Aa" harder to comprehend than "Match case", and "Ab" harder to comprehend than "Match whole word".
  3. The keyboard shortcuts to select Match case/whole word are only visible in the tooltip.
  4. The dialog is no longer moveable.

I know about remapping "Find in Files" to Ctrl+F, but then there are too many clicks to search the current document vs all files.

Upvotes: 31

Views: 3886

Answers (4)

ingredient_15939
ingredient_15939

Reputation: 3134

There doesn't seem to be a way to accomplish this in Visual Studio per se, however if you install AutoHotkey, you can simulate similar behaviour to VS2010 (also a favourite version of mine).

The AHK script I made for myself is here: pastebin.com/M0fVTzLr

It assumes you have CTRL-SHIFT-F and CTRL-F mapped to "Find in Files". So when you hit CTRL-F, for example, "Find in Files" dialog appears, and the AHK script sets the "Look In" to "Current Document". Also, when you press ENTER, it doesn't do a "Find All" but does a "Find Next". To perform a real "Find All", you'll have to hit ALT-A.

In addition, I made SHIFT-ENTER perform a "Find Previous".

So basically, with this AHK script, you just hit CTRL-F, type your text to find, the hit ENTER to find it, and SHIFT-ENTER to find previous.

If you wish to simulate the behaviour of closing the Find in Files dialog after you hit ENTER and it does the first find, then change the line:

Enter::SendInput !f

to:

Enter::
  SendInput !f
  Wait 100
  SendInput {esc}
  Return

Note: It will always set the "Look In" box to "Current Document", even if you have text selected. However, you could always set up another hotkey, such as CTRL-ALT-F, to do the same as above but set the "Look In" box to "Selected Text". As CTRL-F forces it back to "Current Document", you don't have to worry about what the default will always be. :)

Upvotes: 2

Sameers Javed
Sameers Javed

Reputation: 352

Its the same shortcut, CTRL+SHIFT+F However, seems like it is changed a lot.

  1. By default, it will show "ALL" results in a new window
  2. You have click on Find "Find Next" to find within open document.

I am also used to use that old dialog. I am not feeling comfortable with this new dialog. Wish I could bring back that old dialog somehow.

thanks Sameers

Upvotes: 3

Chris Alonzo
Chris Alonzo

Reputation: 43

Ctrl-Shift-F is a different dialog than Ctrl-F. It is the old dialog.

Upvotes: -1

Sunius
Sunius

Reputation: 2907

The shortcut for opening the find dialog is Ctrl + Shift + F.

Upvotes: -3

Related Questions