Modify the shortcut keys for VS2017 to open the Find in file window and format code

       Many friends who often use VS2010 are used to using the Ctrl+F shortcut key to open the Find in file window, and using Alt+F8 to format the code, but the shortcut keys for the corresponding functions of VS2017 have changed. This article briefly introduces how to modify these two shortcut keys.

1. Change the shortcut key to open the "Find in Files" window to Ctrl+F

       Press the Ctrl+F shortcut in VS2017 to open the Quick Find window , as shown below:

But this window is not easy to use, there is no way to specify the folder to search. In VS2010, the Ctrl+F shortcut brings up the Find in Files window :

It's still easier to use the Find window in the file. In addition to searching in the current file and solution, you can also specify a folder to search.

       When using VS2010, many people may be accustomed to using the Ctrl+F shortcut to call up the Find-in-File window, so if they want to reset the shortcut, point the Ctrl+F shortcut to the Find-in-File window. You can click Tools->Options in the menu bar to open the VS2017 settings window, click Environment->Keyboard in the window, enter the keyword "Find" in the opened sub-window, and find the item "Edit.Find":

This item corresponds to the Quick Find window , delete its Ctrl+F shortcut. Then continue to find the "Edit. Find in file " item under the filter condition of "Find ":

Delete its default shortcut key, and then set its corresponding shortcut key to Ctrl+F.

2. Change the shortcut key of formatting code to Alt+F8

The shortcut key used to format the selected code in         VS2010 is Alt+F8. We are used to this shortcut, but in VS2017, the shortcut key for formatting the code is Ctrl+K, Ctrl+F, which is very troublesome to use. Search with formatting as the keyword to find the item "Edit.Format Selection ":

Delete the default shortcut key for this item, and then set it to Alt+F8.

Guess you like

Origin blog.csdn.net/chenlycly/article/details/124144738