Visual Studio 2019 Code Navigation (Ctrl+T)

Visual Studio 2019 is one of the best developer friendly Integrated Development Environment (IDE) developed and maintained by Microsoft. Visual Studio can be used to develop a plethora of different applications such as Console Applications, Windows applications (Winforms and WPF), Web application, Next-generation Internet of Things, Machine Learning applications and many more. Visual Studio provides an excessive list of keyboard shortcuts to ease development work. In this blog, we will talk about Visual Studio 2019 code navigation using the “Go to All” shortcut, which provides a very convenient way to move around in the current and solution files.

How to perform code navigation in Visual Studio using “Go to All” (Ctrl+T) shortcut

The Go to All shortcut can be invoked in two ways, The first one is from the Edit menu and the second one is by pressing CTRL+T keys, Go to All search either ways dialog will be displayed. Here in the dialog is where you place your desired keyword.

Visual Studio 2019 Go to All Ctrl+T
Opening Option Dialog

When the user types in any keyword in the dialog, the dialog displays all the matching objects as a list and the first item in the list is navigated (the cursor is placed at the beginning of the keyword) and the file containing the keyword is opened in preview mode by default. When the user selects an item from the given list, the visual studio navigates to the selected object. Here the objects can be any class (type), member of any class, any file or can jump to any particular line in the currently opened file. For example, we type “grid” as the keyword, the search result displays all the objects containing the grid string in its name and the first item in the list is opened.

Navigate code in Visual Studio 2019 using Go to All Ctrl+T

The Go to All dialog provides six keywords to filter the objects the search will be applied to, the list of available filters can be found using help filter keyword provided by the dialog. To list all the filters type “?” in the dialog box, this will display the help as given below snapshot.

Visual Studio 2019 Go to All Help

Read: How to change themes in Visual Studio

When you want only specific objects to be navigated then you prefix your search keyword with the filter keyword listed as help. Like for example if you want to navigate to files only having controller in their name then you prefix controller search keyword as “f controller” or if you want to navigate to a particular line in the current file then you use “: <line number>“.

The details of each filter keyword as follow:

  • # Symbols: If you want to navigate to symbols only then add a # (hash) before the search keyword.
  • : Line: If you want to go to any specific line in the current document then add a : (colon) before the line number.
  • f Files: If you want to navigate only to files then add f (character) before the search keyword.
  • m Members: If you want to navigate to members only them place the m (character) before the search keyword.
Visual Studio 2019 Go to All Code Navigation

Personally, I have been using “Go to All” without any filters as Visual Studio almost accurately finds and navigates the object that I am looking for, provided I have typed the existing object name correctly. This concludes the article about code navigation in Visual Studio 2019, I hope you find it helpful, cheers !!!

To know more about the available list of available Visual Studio 2019 Shortcuts: click here and if you want to download Visual Studio 2019 from Microsoft: please click here.

Learn about how to create a NET Core WPF application or Machine Learning Terminologies.

0 0 vote
Article Rating
Subscribe
Notify of
guest
4 Comments
oldest
newest most voted
Inline Feedbacks
View all comments