Navigate file by its structure
View | Tool Windows | Structure
With JetBrains Rider, you can navigate the structure of the current document using the Structure window, which greatly simplifies navigation in large files. The window is synchronized with the editor: as you switch to another editor tab, the window displays the structure of the corresponding file.
tip
To list file members using a popup instead of a tool window, press
Press or choose View | Tools Windows | Structure.
The contents of the current document appear in a tree structure, that you can explore and navigate through the document. You can double-click any symbol to make the caret in the editor switch to the corresponding position.
By default, the Structure window displays all files and members in the file as well as related members accessible in the context of the file, such as members from base types. However, you can hide specific kinds of items using filters. Click View Options on the window title and select the desired filters.
If some parts of the code are surrounded by
#region
blocks, the regions appear in the file structure too.To synchronize the way you change caret position in the editor with the symbol highlighted in the Structure window, click Options on the toolbar and select Always Select Opened Element.
To synchronize symbols that you select in the Structure window with the caret position in the editor, click Options on the toolbar and select Navigate with Single Click.
To view members from base types that are implicitly available in the current type, click View Options on the toolbar and select From Related Files,
You can see the VCS status colors in the Structure tool window and the File Members popup if your project is under version control. It helps you track changes in files. The names of modified objects become blue, and the names of the newly added objects appear highlighted in green.
Right from the Structure window, you can access even more actions. To check available commands, you can right-click any symbol.
To open a specific type or member in the editor, double-click it or press Enter or .
If the opened file contains unit tests, these are marked with corresponding icons displaying the status of their last execution. You can also run and debug unit tests right from inside the Structure window.
tip
To search items in the Structure window, just start typing a name or a CamelHumps abbreviation.
You can also explore and navigate file structure from the Navigation bar. When the Navigation bar is enabled, you can click a type to list all its members and choose one to navigate to. Alternatively, you can press to switch the keyboard focus to the Navigation bar and then use the arrow keys to navigate the structure.
This behavior is enabled by default. If you want to disable it, use the View | Appearance | Navigation Bar | Show members option in the main menu.