I find the new "quick find" dialog hard to use:
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.
To reverse your last Undo, press CTRL+Y.
On the menu bar, choose Tools > Options. Expand Environment, and then choose Keyboard. Optional: Filter the list of commands by entering all or part of the name of the command, without spaces, in the Show commands containing box. In the list, choose the command to which you want to assign a keyboard shortcut.
When using Visual Studio Code on Windows, you can use CTRL + PAGE_UP to switch to the previous tab, and CTRL + PAGE_DN to switch to the next tab. You also have the ability to switch to tabs based on their (non-zero relative) index. You can do so, by pressing and holding ALT , followed by a number (1 through 9).
Its the same shortcut, CTRL+SHIFT+F However, seems like it is changed a lot.
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
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. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With