Skip to content

Commit 4b8d2ec

Browse files
committed
edit pass: navigate-code-cpp
1 parent 5bc3058 commit 4b8d2ec

File tree

1 file changed

+44
-44
lines changed

1 file changed

+44
-44
lines changed

docs/ide/navigate-code-cpp.md

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
11
---
22
title: "Navigate C++ code in Visual Studio"
3-
description: "Use various tools in Visual Studio to navigate around your C++ code base."
3+
description: "Use various tools in Visual Studio to navigate around your C++ codebase."
44
ms.date: "05/28/2019"
55
---
66
# Navigate C++ code in Visual Studio
77

8-
Visual Studio provides a suite of tools to allow you to navigate around your codebase quickly and efficiently.
8+
Visual Studio provides a suite of tools that you can use to navigate around your codebase quickly and efficiently.
99

1010
## Open an included file
1111

12-
Right-click on an `#include` directive and choose **Go To Document**, or press **F12** with the cursor over that line, to open the file.
12+
Right-click an `#include` directive, and select **Go To Document**. Or, select **F12** with the cursor over that line to open the file.
1313

1414
![C++ Go To Document menu option](../ide/media/go-to-document.png "Go To Document")
1515

1616
## Toggle Header/Code File
1717

18-
You can switch between a header file and its corresponding source file, by right-clicking anywhere in your file and choosing **Toggle Header / Code File** or by pressing **Ctrl + K, Ctrl + O**.
18+
You can switch between a header file and its corresponding source file. Right-click anywhere in your file and select **Toggle Header/Code File**. Or, you can select **Ctrl+K**, **Ctrl+O**.
1919

2020
## Go To Definition/Declaration
2121

22-
You can navigate to the definition of a code symbol by right-clicking it in the editor and choosing **Go To Definition**, or pressing **F12**. You can navigate to a declaration similarly from the right-click context menu, or by pressing **Ctrl + F12**.
22+
You can navigate to the definition of a code symbol by right-clicking it in the editor and selecting **Go To Definition**, or by selecting **F12**. You can navigate to a declaration similarly by right-clicking to open the context menu, or by selecting **Ctrl+F12**.
2323

2424
![C++ Go To Definition](../ide/media/go-to-def.png "Go To Definition")
2525

2626
## Go To
2727

2828
**Go To** refers to a set of navigation features that each provide a specific kind of result based on filters you specify.
2929

30-
You can open **Go To** with **Ctrl + ,**. This creates a search box over the document you are editing.
30+
You can open **Go To** with **Ctrl+,**. This action creates a search box over the document you're editing.
3131

3232
![C++ Go To](../ide/media/go-to-cpp.png "Go To")
3333

3434
**Go To** includes these search filters:
3535

36-
- **Go To Line (Ctrl + G)**: quickly jump to a different line in your current document
37-
- **Go To All (Ctrl + ,)** or **(Ctrl + T)**: search results include everything below
38-
- **Go To File (Ctrl 1, F)**: search for files in your solution
39-
- **Go To Type (Ctrl 1, T)**: search results include:
40-
- Classes, Structs, Enums
41-
- Interfaces & Delegates (managed code only)
42-
- **Go To Member (Ctrl 1, M)**: search results include:
43-
- Global variables and global functions
44-
- Class member variables and member functions
45-
- Constants
46-
- Enum Items
47-
- Properties and Events
48-
- **Go To Symbol (Ctrl 1, S)**: search results include:
49-
- Results from Go To Types and Go To Members
50-
- All remaining C++ language constructs, including macros
51-
52-
When you first invoke **Go To** with **Ctrl +** , **Go To All** is activated (no filters on search results). You can then select your desired filter by using the buttons near the search textbox. You can invoke a specific filter using its corresponding keyboard shortcut. Doing so opens the **Go To** search box with that filter pre-selected. All keyboard shortcuts are configurable.
53-
54-
To apply a text filter, start your search query with the filter’s corresponding character followed by a space. (**Go To Line** can optionally omit the space.) These are the available text filters:
36+
- **Go To Line** (**Ctrl+G**): Quickly jump to a different line in your current document.
37+
- **Go To All** (**Ctrl+,**) or (**Ctrl+T**): Search results include everything that follows.
38+
- **Go To File** (**Ctrl 1, F**): Search for files in your solution.
39+
- **Go To Type** (**Ctrl 1, T**): Search results include:
40+
- Classes, structs, and enums.
41+
- Interfaces and delegates (managed code only).
42+
- **Go To Member** (**Ctrl 1, M**): Search results include:
43+
- Global variables and global functions.
44+
- Class member variables and member functions.
45+
- Constants.
46+
- Enum items.
47+
- Properties and events.
48+
- **Go To Symbol** (**Ctrl 1, S**): Search results include:
49+
- Results from Go To Types and Go To Members.
50+
- All remaining C++ language constructs, which includes macros.
51+
52+
When you first invoke **Go To** with **Ctrl +**, **Go To All** is activated (no filters on search results). You then can select the filter you want by using the buttons near the search box. You can invoke a specific filter using its corresponding keyboard shortcut. Doing so opens the **Go To** search box with that filter preselected. All keyboard shortcuts are configurable.
53+
54+
To apply a text filter, start your search query with the filter’s corresponding character followed by a space. (**Go To Line** can optionally omit the space.) These text filters are available:
5555

5656
- Go To All: (no text filter)
5757
- Go To Line Number: :
@@ -60,35 +60,35 @@ To apply a text filter, start your search query with the filter’s correspondin
6060
- Go To Member: m
6161
- Go To Symbol: #
6262

63-
The following example shows results from a *Go To Files* operation using the 'f' filter:
63+
The following example shows results from a *Go To Files* operation by using the "f" filter:
6464

6565
![C++ Go To Menu](../ide/media/vs2017-go-to-results.png "Go To Menu")
6666

67-
To see the list of text filters, type a ? followed by a space. You can also access the **Go To** commands with the **Edit** menu. This is another way to remind yourself of the main Go To keyboard shortcuts.
67+
To see the list of text filters, type a ? followed by a space. You also can access the **Go To** commands with the **Edit** menu. This is another way to remind yourself of the main **Go To** keyboard shortcuts.
6868

6969
![C++ Go To Menu](../ide/media/go-to-menu-cpp.png "Go To Menu")
7070

71-
## Find / Find in Files
71+
## Find or Find in Files
7272

73-
You can run a text search for anything in your solution with **Find (Ctrl + F)** or **Find in Files (Ctrl + Shift + F)**.
73+
You can run a text search for anything in your solution with **Find** (**Ctrl+F**) or **Find in Files** (**Ctrl+Shift+F**).
7474

75-
Find can be scoped to a selection, the current document, all open documents, the current project, or the entire solution. You can use regular expressions as well as plain text. It also highlights all matches automatically in the IDE.
75+
**Find** can be scoped to a selection, the current document, all open documents, the current project, or the entire solution. You can use regular expressions and plain text. It also highlights all matches automatically in the IDE.
7676

7777
![C++ Find](../ide/media/find-cpp.png "Find")
7878

79-
**Find in Files** is a more powerful version of **Find** that displays results in the **Find Results** window. You can search external code dependencies, filter by filetypes, and more.
79+
**Find in Files** is a more powerful version of **Find** that displays results in the **Find Results** window. You can search external code dependencies, filter by file types, and more.
8080

8181
![C++ Find in Files](../ide/media/find-in-files-cpp.png "Find in Files")
8282

83-
You can organize **Find in Files** results in two windows. You can append results from multiple searches together. Click on a result to go to that location in the file.
83+
You can organize **Find in Files** results in two windows. You can append results from multiple searches together. Select a result to go to that location in the file.
8484

8585
![C++ Find in Files](../ide/media/vs2017-find-in-files-results.png "Find in Files")
8686

8787
For more information, see [Find in Files](/visualstudio/ide/find-in-files) in the Visual Studio documentation.
8888

8989
## Find All References
9090

91-
To find all usages of a symbol in your codebase, place the caret in or just after the symbol, then right-click and choose **Find All References**. You can filter, sort, or group results in many different ways. Results populate incrementally. They are classified as Reads or Writes to help you see what is in your solution as opposed to system headers or other libraries.
91+
To find all usages of a symbol in your codebase, place the caret in or just after the symbol, right-click, and then select **Find All References**. You can filter, sort, or group results in many different ways. Results populate incrementally. They're classified as Reads or Writes to help you see what's in your solution as opposed to system headers or other libraries.
9292

9393
![C++ Find all references](../ide/media/find-all-references-results-cpp.png "Find all references")
9494

@@ -102,28 +102,28 @@ You group results by the following categories:
102102

103103
#### Filter results
104104

105-
To filter results, hover over a column and click the filtering icon that pops up. You can filter results from the first column to hide things like string and comment references that you might not want to see.
105+
To filter results, hover over a column and select the filtering icon that pops up. You can filter results from the first column to hide things like string and comment references that you might not want to see.
106106

107107
![C++ Find all references filters](../ide/media/find-all-references-filters-cpp.png "Find all references filters")
108108

109-
- **Confirmed Results**: Actual code references to the symbol being searched for. For example, searching for a member function called `Size` will return all references to `Size` that match the scope of the class defining `Size`.
109+
- **Confirmed results**: Actual code references to the symbol being searched for. For example, searching for a member function called `Size` returns all references to `Size` that match the scope of the class that defines `Size`.
110110

111-
- **Disconfirmed Results**: This filter is off by default because it shows symbols whose name matches but are not actual references to the symbol you are searching for. For example, if you have two classes that each define a member function called `Size`, and you run a search for `Size` on a reference from an object of `Class1`, any references to `Size` from `Class2` appear as disconfirmed.
111+
- **Disconfirmed results**: This filter is off by default because it shows symbols whose name matches but aren't actual references to the symbol you're searching for. For example, if you have two classes that each define a member function called `Size`, and you run a search for `Size` on a reference from an object of `Class1`, any references to `Size` from `Class2` appear as disconfirmed.
112112

113-
- **Unprocessed Results**: **Find All References** operations can take time to complete on larger codebases, so the Results list shows "unprocessed" results here. Unprocessed results match the name of the symbol being searched for but have not yet been confirmed as actual code references. You can turn on this filter to get faster results. Just be aware that some results might not be actual references.
113+
- **Unprocessed results**: **Find All References** operations can take time to complete on larger codebases, so the Results list shows "unprocessed" results here. Unprocessed results match the name of the symbol being searched for but haven't yet been confirmed as actual code references. You can turn on this filter to get faster results. Just be aware that some results might not be actual references.
114114

115115
#### Sort results
116116

117-
You can sort results by any column by clicking on that column. You can swap between ascending/descending order by clicking the column again.
117+
You can sort results by any column by selecting that column. You can swap between ascending or descending order by selecting the column again.
118118

119119
## Navigation Bar
120120

121-
You can navigate to the definition of a type in a file, or to type members, by using the **Navigation Bar** that is above the editor window.
121+
You can navigate to the definition of a type in a file, or to type members, by using the **Navigation Bar** that's above the editor window.
122122

123-
![C++ Navigation bar](../ide/media/navbar-cpp.png "Navigation bar")
123+
![C++ Navigation Bar](../ide/media/navbar-cpp.png "Navigation Bar")
124124

125-
## See Also
125+
## See also
126126

127-
[Read and understand C++ code](read-and-understand-code-cpp.md)</br>
128-
[Edit and refactor C++ code](read-and-understand-code-cpp.md)</br>
129-
[Collaborate with Live Share for C++](live-share-cpp.md)
127+
- [Read and understand C++ code](read-and-understand-code-cpp.md)</br>
128+
- [Edit and refactor C++ code](read-and-understand-code-cpp.md)</br>
129+
- [Collaborate with Live Share for C++](live-share-cpp.md)

0 commit comments

Comments
 (0)