Quick Searches

Quick Find and Quick Replace can be considered as all-purpose, generic searches. Where incremental search is the most focused search and Find In Files is the most comprehensive search, the following "Quick" search-and-replace features are in the middle of the road.

Quick Find

Quick Find is your standard Ctrl+F search, as represented in most of today’s software applications.

Tip 3.5: You can use Ctrl+F to use Quick Find in the current document

Pressing Ctrl+F brings up the UI to start a Quick Find search in the current document.

Tip 3.5: You can use Ctrl+F to use Quick Find in the current document

Quick Find prepopulates the Find What text with whatever text is selected in the editor or the word that the cursor is currently on.

Additionally, this Find And Replace window is actually a tool window, so you can dock it somewhere and continue to type in the editor while the window is open.

Tip 3.6: How to use the Find combo box to do a Quick Find in the current document

The Find combo box is another way of doing a Quick Find with the scope limited to the current document.

Press Ctrl+D to reach the Find Combo box. Now type whatever search string you want, and press Enter to do a forward search or Shift+Enter to do a reverse search.

Tip 3.6: How to use the Find combo box to do a Quick Find in the current document

Tip 3.7: How to customize the Find combo box (Ctrl+D) search

Press Ctrl+F to bring up the Quick Find window and expand the Find Options section. These options also control the Find combo box.

Tip 3.7: How to customize the Find combo box (Ctrl+D) search

Quick Replace

The Quick Replace feature uses a Quick Find to find all the occurrences of the search term and then replace them with the desired text.

Tip 3.8: You can use Ctrl+H to bring up the Quick Replace window

Press Ctrl+H to bring up the Quick Replace window. The command is Edit.Replace. You need to press either the Replace button or the Replace All button to start the find-and-replace action.

Tip 3.8: You can use Ctrl+H to bring up the Quick Replace window

Additionally, you can customize your find-and-replace experience by expanding the Find Options section.

Tip 3.9: How to hide the Quick Find/Quick Replace window after the first search hit

Let’s say you are searching for some text, and you want the Ctrl+F Quick Find window or the Ctrl+H Quick Replace window to disappear after the first search.

Go to the Tools–Options–Environment–Find And Replace page, and check the Hide Find And Replace Window After A Match Is Located For Quick Find Or Quick Replace option.

Tip 3.9: How to hide the Quick Find/Quick Replace window after the first search hit

Quick Symbol

And the final search feature that’s labeled as "quick" is for searching for symbols, whether it is in your solution or in the entire Microsoft .NET Framework.

Tip 3.10: How to search for a symbol

The final search command is Edit.FindSymbol, bound to Alt+F12. Using this command, you can search within your current solution (including or excluding references), or even within the .NET Framework.

Tip 3.10: How to search for a symbol

Tip 3.11: You can use Shift+Alt+F12 to use Find Symbol

Like in the previous tip about Find Symbol, select a word in the editor you want to use Find Symbol with and then press Shift+Alt+F12. No Find Symbol window will appear. It is bound to Edit.QuickFindSymbol.

Tip 3.11: You can use Shift+Alt+F12 to use Find Symbol

Shift+Alt+F12 uses the same customizations in the Find Symbol window. So, if you need to change the scope for Find Symbol, make the customization in the Find Symbol window.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.36.221