Skip to content

Commit f8fd8e0

Browse files
committed
Merge branch 'gewarren-install' of github.com:MicrosoftDocs/visualstudio-docs-pr into gewarren-install
2 parents 8cdfabb + 92b6d04 commit f8fd8e0

13 files changed

+320
-266
lines changed

docs/ide/TOC.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,18 @@
113113
### [JavaScript IntelliSense](javascript-intellisense.md)
114114
### [Visual C++ Intellisense](visual-cpp-intellisense.md)
115115
### [Supplying XML Code Comments](supplying-xml-code-comments.md)
116+
## [Navigating Your Code](navigating-code.md)
117+
### [Finding references in your code](finding-references.md)
118+
### [Go To Definition and Peek Definition](go-to-and-peek-definition.md)
119+
### [How to: View and Edit Code by Using Peek Definition (Alt+F12)](how-to-view-and-edit-code-by-using-peek-definition-alt-plus-f12.md)
120+
### [Find code using Go To commands](go-to.md)
116121
## [Customizing the Editor](customizing-the-editor.md)
117122
### [How to: Change Text Case in the Editor](how-to-change-text-case-in-the-editor.md)
118123
### [How to: Manage Editor Modes](how-to-manage-editor-modes.md)
119124
### [How to: Manage Editor Windows](how-to-manage-editor-windows.md)
120125
## [Develop code in Visual Studio without projects or solutions](develop-code-in-visual-studio-without-projects-or-solutions.md)
121126
## [Create portable, custom editor settings with EditorConfig](create-portable-custom-editor-options.md)
122127
## [How to: Track Your Code by Customizing the Scrollbar](how-to-track-your-code-by-customizing-the-scrollbar.md)
123-
## Navigating Your Code
124-
### [Go To](go-to.md)
125-
### [How to: View and Edit Code by Using Peek Definition (Alt+F12)](how-to-view-and-edit-code-by-using-peek-definition-alt-plus-f12.md)
126128
## [Code Snippets](code-snippets.md)
127129
### [Walkthrough: Creating a Code Snippet](walkthrough-creating-a-code-snippet.md)
128130
### [How to: Distribute Code Snippets](how-to-distribute-code-snippets.md)

docs/ide/finding-references.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: "Finding references in your code | Microsoft Docs"
3+
ms.custom: ""
4+
ms.date: "09/26/2017"
5+
ms.reviewer: ""
6+
ms.suite: ""
7+
ms.technology:
8+
- "vs-ide-general"
9+
ms.tgt_pltfrm: ""
10+
ms.topic: "article"
11+
helpviewer_keywords:
12+
- "code editor, find all references"
13+
- "find all references"
14+
author: "gewarren"
15+
ms.author: "gewarren"
16+
manager: "ghogen"
17+
---
18+
# Finding references in your code
19+
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 are a keyboard user, press **Shift + F12**.
20+
21+
The results appear in a tool window named **'*element*' references**, where *element* is the name of the item you are searching for. A toolbar in the **references** window enables you to:
22+
- 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.
23+
- Copy the selected referenced item by choosing the **Copy** button.
24+
- Choose buttons to go to the next or previous location in the list, or press the **F8** and **Shift + F8** keys to do so.
25+
- Remove any filters on the returned results by choosing the **Clear All Filters** button.
26+
- Change how returned items are grouped by choosing a setting in the **Group by:** drop-down list box.
27+
- 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.
28+
- Search for strings within the search results by entering text in the **Search Find All References** text box.
29+
30+
You can also hover the mouse over any search result to see a preview of the reference.
31+
32+
![Find All References tool window](../ide/media/vside_findallreferences.png)
33+
34+
### Navigate to references
35+
You can use the following methods to navigate to references in the **references** window:
36+
37+
- Press **F8** to go to the next reference, or **Shift + F8** to go to the previous reference.
38+
- Press the **Enter** key on a reference, or double-click it, to go to it in code.
39+
- On the context menu of a reference, choose the **Go To Previous Location** or **Go To Next Location** commands.
40+
- Choose the **UP arrow** and **DOWN arrow** keys (if they are enabled in the Options dialog box). To enable this functionality, on the menu bar, choose **Tools**, **Options**, **Environment**, **Tabs and Windows**, **Preview Tab**, and then select the **Allow new files to be opened in the preview tab** and **Preview selected files in Find Results** boxes.
41+
42+
### Change reference groupings
43+
By default, references are grouped by project, then by definition. However, you can change this grouping order by changing the setting in the **Group by:** drop-down list box on the toolbar. For example, you can change it from the default setting of **Project then definition** to **Definition then project**, as well to other settings.
44+
45+
**Definition** and **Project** are the two default groupings used, but you can add others by choosing the **Grouping** command on the selected item's context menu. Adding more groupings can be helpful if your solution has a lot of files and paths.
46+
47+
## See also
48+
[Navigating Code](../ide/navigating-code.md)

docs/ide/go-to-and-peek-definition.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: "Go To Definition and Peek Definition | Microsoft Docs"
3+
ms.custom: ""
4+
ms.date: "09/26/2017"
5+
ms.reviewer: ""
6+
ms.suite: ""
7+
ms.technology:
8+
- "vs-ide-general"
9+
ms.tgt_pltfrm: ""
10+
ms.topic: "article"
11+
helpviewer_keywords:
12+
- "code editor, go to definition"
13+
- "code editor, peek definition"
14+
- "go to definition"
15+
- "peek definition"
16+
author: "gewarren"
17+
ms.author: "gewarren"
18+
manager: "ghogen"
19+
---
20+
# Go To Definition and Peek Definition
21+
The Go To Definition and Peek Definition features enable you to easily view the definition of a type or member.
22+
23+
## Go To Definition
24+
The Go To Definition feature navigates to the source of a type or member, and opens the result in a new tab. If you are a keyboard user, place your text cursor somewhere inside the symbol name and press **F12**. If you are a mouse user, either select **Go To Definition** from the context menu, or, use the **Ctrl-click** functionality described below.
25+
26+
### Ctrl-click Go To Definition
27+
New for Visual Studio 2017 version 15.4 is an easier way for mouse users to quickly access Go To Definition. Symbols become clickable when you press **Ctrl** and hover over the type or member. To quickly navigate to the definition of a symbol, press the **Ctrl** key and then click on it. It's that easy!
28+
29+
![Mouse click go to definition animation](../ide/media/click_gotodef.gif)
30+
31+
You can change the modifier key for mouse-click **Go To Definition** by going to **Tools**, **Options**, **Text Editor**, **General**, and selecting either **Alt** or **Ctrl+Alt** from the **Use modifier key** drop-down. You can also disable mouse-click **Go To Definition** by unchecking the **Enable mouse click to perform Go To Definition** checkbox.
32+
33+
![Enabling mouse-click go to definition](../ide/media/editor_options_mouse_click_gotodef.png)
34+
35+
## Peek Definition
36+
The Peek Definition feature lets you preview the definition of a type without leaving your current location in the editor. If you are a keyboard user, place your text cursor somewhere inside the type or member name and press **Alt + F12**. If you are a mouse user, either select **Peek Definition** from the context menu, or, in Visual Studio 2017 version 15.4 and later, there is an additional way to peek view a definition by using the mouse. First, go to **Tools**, **Options**, **Text Editor**, **General**. Select the option **Open definition in peek view** and click **OK** to close the **Options** dialog box.
37+
38+
![Setting the mouse-click peek definition option](../ide/media/editor_options_peek_view.png)
39+
40+
Then, press **Ctrl** (or whichever modifier key is selected in **Options**), and click on the type or member.
41+
42+
![Peek definition animation](../ide/media/peek_definition.gif)
43+
44+
If you peek another definition from the popup window, you will start a breadcrumb path which you can navigate using the circles and arrows which appear above the popup.
45+
46+
For more information, see [How to: View and Edit Code by Using Peek Definition (Alt+F12)](how-to-view-and-edit-code-by-using-peek-definition-alt-plus-f12.md).
47+
48+
## See Also
49+
[Navigating Code](../ide/navigating-code.md)
50+
[How to: View and Edit Code by Using Peek Definition (Alt+F12)](how-to-view-and-edit-code-by-using-peek-definition-alt-plus-f12.md)

docs/ide/go-to.md

Lines changed: 48 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,125 +1,83 @@
11
---
2-
title: "Go To | Microsoft Docs"
2+
title: "Find code using Go To commands | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "11/16/2016"
4+
ms.date: "09/26/2017"
55
ms.reviewer: ""
66
ms.suite: ""
77
ms.technology:
88
- "vs-ide-general"
99
ms.tgt_pltfrm: ""
1010
ms.topic: "article"
1111
ms.assetid: 509b2107-23d1-4fb3-987f-ab99ef45b72e
12+
helpviewer_keywords:
13+
- "code editor, go to"
14+
- "code editor, go to line"
15+
- "go to line"
16+
- "go to"
1217
author: "gewarren"
1318
ms.author: "gewarren"
1419
manager: "ghogen"
15-
translation.priority.ht:
16-
- "cs-cz"
17-
- "de-de"
18-
- "es-es"
19-
- "fr-fr"
20-
- "it-it"
21-
- "ja-jp"
22-
- "ko-kr"
23-
- "pl-pl"
24-
- "pt-br"
25-
- "ru-ru"
26-
- "tr-tr"
27-
- "zh-cn"
28-
- "zh-tw"
2920
---
21+
# Find code using Go To commands
22+
Visual Studio's **Go To** commands perform a focused search of your code to help you quickly find specified items. You can go to a specific line, type, symbol, file, and member from a simple, unified interface. This feature exists in Visual Studio 2017 and later.
3023

31-
# Go To
32-
There are many ways to easily navigate your code inside of the Visual Studio IDE, both from the keyboard and the mouse.
24+
### How to use it
3325

34-
<!-- VERSIONLESS -->
35-
## Go To All
36-
This feature exists in Visual Studio 2017 and later. It allows you to navigate through your code to find the specific bits you are looking for. You can search for a specific line, type, symbol, file, and more from a simple, unified interface.
37-
38-
### How to use
39-
* **Keyboard**
40-
* Press **Ctrl+,** or **Ctrl+T**. (Note that your keyboard shortcut may be different based on which profile you've selected.)
41-
* **Mouse**
42-
* Select **Edit > Go To > Go To All**.
26+
Input | Function
27+
------------ | ---
28+
**Keyboard** | Press **Ctrl + T**
29+
**Mouse** | Select **Edit**, **Go To**, **Go To All**
4330

44-
This will display a small window at the top right of your IDE, by default.
31+
This will display a small window at the top right of your code editor, by default.
4532

4633
![Go To All](media/gotoall.png)
4734

48-
From here, there are several ways to proceed:
49-
* Enter text without a prefix to search using the [filter icons](#filtered-searches) selected below the text box.
50-
* Enter a [prefix](#filtered-searches) followed by the text to search.
51-
* Enter a question mark (?) to get additional help.
35+
As you type in the text box, the results appear in a drop-down list below the text box. To go to an element, choose it in the list.
36+
37+
![Navigate To window](../ide/media/vside_navigatetowindow.png "Navigate To window")
38+
39+
You can also enter a question mark (?) to get additional help.
40+
5241
![Go To All Help](media/gotoall_help.png)
5342

54-
### Filtered Searches
55-
To narrow your search to a specific type, you can either use a prefix when typing, or use the icons below the search window as shown below.
43+
### Filtered Searches
44+
By default, the specified item is searched for in all solution items. However, you can limit your code search to specific element types by prefacing the search terms with certain characters. You can also quickly change the search filter by choosing buttons on the Go To dialog box toolbar. Buttons that change the type filters are on the left side, and buttons that change the scope of the search are on the right side.
45+
46+
![Go to members](../ide/media/vside_navigation_toolbar.png)
47+
48+
#### Filter to a specific type of code element
49+
To narrow your search to a specific type of code element, you can either specify a prefix in the search box, or select one of the five filter icons:
5650

5751
Prefix | Icon | Shortcut | Description
5852
:----: | ---- | -------- | ---
59-
# | ![Symbol Icon](media/gotoall_symbolicon.png) | Ctrl+1, Ctrl+S | Find matching symbols
60-
f | ![File Icon](media/gotoall_fileicon.png) | Ctrl+1, Ctrl+F | Find matching file names
61-
m | ![Member Icon](media/gotoall_membericon.png) | Ctrl+1, Ctrl+M | Find matching members
62-
t | ![Type Icon](media/gotoall_typeicon.png) | Ctrl+1, Ctrl+T | Find matching types
63-
: | ![Line Icon](media/gotoall_lineicon.png) | Ctrl+G | Go to the line number entered
53+
\# | ![Symbol Icon](media/gotoall_symbolicon.png) | Ctrl+1, Ctrl+S | Go to the specified symbol
54+
f | ![File Icon](media/gotoall_fileicon.png) | Ctrl+1, Ctrl+F | Go to the specified file
55+
m | ![Member Icon](media/gotoall_membericon.png) | Ctrl+1, Ctrl+M | Go to the specified member
56+
t | ![Type Icon](media/gotoall_typeicon.png) | Ctrl+1, Ctrl+T | Go to the specified type
57+
: | ![Line Icon](media/gotoall_lineicon.png) | Ctrl+G | Go to the specified line number
6458

65-
### Search Locations
66-
To narrow your search to specific locations, use the two document icons.
59+
#### Filter to a specific location
60+
To narrow your search to a specific location, select one of the two document icons:
6761

6862
Icon | Description
6963
---- | ---
7064
![Current Document](media/gotoall_currentdocument.png) | Search current document only
71-
![External Documents](media/gotoall_external.png) | Search external documents in addition to those located in the project/solution
65+
![External Documents](media/gotoall_external.png) | Search external documents in addition to those located in the project/solution
7266

73-
### Settings
74-
Clicking the gear icon ![Gear Icon](media/gotoall_gear.png) at the lower-right lets you change how this feature works.
67+
### Camel casing
68+
If you use [camel casing](https://en.wikipedia.org/wiki/Camel_case) in your code, you can find code elements faster by entering only the capital letters of the code element name. For example, if your code has a type called `CredentialViewModel`, you can narrow down the search by choosing the Type filter ("t") and then entering just the capital letters of the name (`CVM`) in the Go To dialog box. This feature can be helpful if your code has long names.
69+
70+
![Navigate To window - searching with capitals](../ide/media/vside_capitalsearch.png)
71+
72+
### Settings
73+
Selecting the gear icon ![Gear Icon](media/gotoall_gear.png) lets you change how this feature works:
7574

7675
Setting | Description
7776
------- | ---
7877
Use preview tab | Display the selected item immediately in the IDE's preview tab
79-
Show details | Display project, file, line and summary information from documentation comments in the window
80-
Center window | Move this window to the center of the IDE instead of the top-right
81-
<!-- END VERSIONLESS -->
82-
83-
## Go To Definition
84-
Navigate to the source of a type and open the result in a new tab:
85-
86-
Input | Function
87-
------------ | ---
88-
**Keyboard** | Place your text cursor somewhere inside the type name, and press **F12**
89-
**Mouse** | Right-click on the type name and select **Go To Definition**
90-
91-
## Peek Definition
92-
Preview the definition of a type in a popup window instead of a new tab:
93-
94-
Input | Function
95-
------------ | ---
96-
**Keyboard** | Place your text cursor somewhere inside the type name, and press **Alt+F12**
97-
**Mouse** | Right-click on the type name and select **Peek Definition**
98-
99-
If you peek another definition from the popup window, you will start a breadcrumb path which you can navigate using the circles and arrows which appear above the popup. For more information, see [How to: View and Edit Code by Using Peek Definition (Alt+F12)](how-to-view-and-edit-code-by-using-peek-definition-alt-plus-f12.md).
100-
101-
## Go To Implementation
102-
Navigate from a base class or type to its implementations. If there are multiple implementations, you will see them listed in the **Find Symbol Results** window:
103-
104-
Input | Function
105-
------------ | ---
106-
**Keyboard** | Place your text cursor somewhere inside the type name, and press **Ctrl+F12**
107-
**Mouse** | Right-click on the type name and select **Go To Implementation**
108-
109-
## Find All References
110-
Find all places where a method/property/variable is being used. You can use this to verify dead code and check possible side-effects of a large refactoring. Press **F8** to jump between results.
111-
112-
Input | Function
113-
------------ | ---
114-
**Keyboard** | Place your text cursor somewhere inside the type name, and press **Ctrl+K, R**
115-
**Mouse** | Right-click on the type name and select **Find All References**
116-
117-
## Navigating Results
118-
When using the navigation features of Visual Studio, you can navigate forward and backward through the stack:
119-
120-
Input | Function
121-
------------ | ---
122-
**Ctrl+-** | Navigate backward through the stack
123-
**Ctrl+Shift+-** | Navigate forward through the stack
78+
Show details | Display project, file, line, and summary information from documentation comments in the window
79+
Center window | Move this window to the top-center of the code editor, instead of the top-right
12480

125-
You can also use the **View > Navigate Backward** and **View > Navigate Forward** menu items.
81+
## See Also
82+
[Navigating Code](../ide/navigating-code.md)
83+
[Go To Definition and Peek Definition](../ide/go-to-and-peek-definition.md)

0 commit comments

Comments
 (0)