Skip to content

Commit 70411bd

Browse files
author
Jill Grant
authored
Merge pull request #12480 from ghogen/freshness-april-2024
Review and update
2 parents 0bd9d1b + cf2c6a1 commit 70411bd

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

docs/ide/finding-references.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Finding references in your code
33
description: Explore the Find All References command in Visual Studio to find references to particular code elements in your code, including by reference type.
4-
ms.date: 02/15/2023
4+
ms.date: 04/10/2024
55
ms.topic: conceptual
66
helpviewer_keywords:
77
- code editor, find all references
@@ -13,30 +13,29 @@ ms.subservice: general-ide
1313
---
1414
# Find references in your code
1515

16-
You can use the **Find All References** command to find where particular code elements are referenced throughout your codebase. The **Find All References** command is available on the context (right-click) menu of the element you want to find references to. Or, if you're a keyboard user, press **Shift + F12**.
16+
You can use the **Find All References** command to find where particular code elements are referenced throughout your codebase. The **Find All References** command is available on the context (right-click) menu of the element you want to find references to. Or, press **Alt + F2**.
1717

1818
The results appear in a tool window named **\<element> references**, where *element* is the name of the item you're searching for. A toolbar in the **references** window enables you to do the following:
1919

20-
- Change the scope of the search in a drop-down list box. You can choose to look only in changed documents all the way up to the entire solution.
21-
- Copy the selected referenced item by choosing the **Copy** button.
22-
- Choose buttons to go to the next or previous location in the list, or press the **F8** and **Shift + F8** keys to do so.
20+
- Change the scope of the search in a drop-down list box. You can choose to look only in open or changed documents, all the way up to the entire solution.
21+
- Copy the selected referenced item(s) by choosing the **Copy** button. All the values in all the columns for all selected rows are copied to the clipboard, preceded by the column headings. This makes it easy to paste into a spreadsheet.
22+
- Choose buttons to go to the next or previous location in the list, or press the up and down arrow keys to do so.
2323
- Remove any filters on the returned results by choosing the **Clear All Filters** button.
2424
- Change how returned items are grouped by choosing a setting in the **Group by:** drop-down list box.
2525
- Keep the current search results window by choosing the **Keep Results** button. When you choose this button, the current search results stay in this window, and new search results appear in a new tool window.
2626
- Search for strings within the search results by entering text in the **Search Find All References** text box.
2727

28-
You can also hover the mouse over any search result to see a preview of the reference.
28+
You can also hover the mouse over any search result to see the reference in the context of the surrounding code.
2929

3030
![Screenshot of the Find All References tool window.](../ide/media/vside_findallreferences.png)
3131

3232
## Navigate to references
3333

3434
You can use the following methods to navigate to references in the **references** window:
3535

36-
- Press **F8** to go to the next reference, or **Shift + F8** to go to the previous reference.
3736
- Press the **Enter** key on a reference, or double-click it, to go to it in code.
3837
- On the right-click menu (context menu) of a reference, choose the **Go To Previous Location** or **Go To Next Location** commands.
39-
- Choose the **Up Arrow** and **Down Arrow** keys (if they're enabled in the **Options** dialog box). To enable this functionality, on the menu bar, choose **Tools** > **Options** > **Environment** > **Tabs and Windows**, and then in the **Preview Tab** section, select the **Allow new files to be opened in the preview tab** and **Preview selected files in Find Results** boxes.
38+
- Use the **Up Arrow** and **Down Arrow** keys.
4039

4140
## Change reference groupings
4241

@@ -52,6 +51,10 @@ In C# or Visual Basic, the **Find References** window has a **Kind** column wher
5251

5352
After you apply a filter or a filter set, you can easily remove it by using the **Clear All Filters** button.
5453

54+
## Customize the experience
55+
56+
To customize the experience, on the menu bar, choose **Tools** > **Options** > **Environment** > **Tabs and Windows**, and then in the **Preview Tab** section, if you select the **Allow new files to be opened in the preview tab** checkbox, you can select or unselect the **Preview selected files in Find Results** checkbox. When selected, the file is opened in the editor at the place where the reference occurs. When unset, the file is only opened if you explicitly press **Enter** or double-click on the row.
57+
5558
## Related content
5659

5760
- [Navigating code](../ide/navigating-code.md)

0 commit comments

Comments
 (0)