How to Find Workspace Symbols in the DVT IDE for VS Code
Overview
Code navigation is essential for speeding-up the process of writing and understanding source code. This video presents how to easily find symbols within your workspace.
Workspace Symbols Documentation:
https://eda.amiq.com/documentation/vscode/sv/toc/workspace-symbols/index.html
https://eda.amiq.com/documentation/vscode/vhdl/toc/workspace-symbols/index.html
Details
Introduction
You can easily locate a class, module, macro, or any other symbol in your project using the Workspace Symbols functionality.
Using the Go To Symbol In Workspace Command
- Open the Command Palette and run the
Go To Symbol In Workspace
command. - Type a few letters of the symbol's name.
- Select the relevant symbol from the list using the arrow keys.
- Press
Enter
to jump to its definition.
Alternatively, you can open the Command Palette and replace the >
character with a #
character, or simply press the Ctrl + T
shortcut.
Advanced Search Techniques
Using Underscore-Separated Segments
You may start typing any of the underscore-separated segments of the symbol's name, and even combine such fragments, to quickly shrink down the list.
Using Wildcards
You can also use wildcards to build search patterns. For example, you can search for symbols that start with AHB
, followed by any character sequence, and end with agent
.
Using the Query Language
Moreover, a dedicated query language is available. For example, if you want to search for a class, you should use the class:
prefix in your query. You can also query for other types of symbols, such as:
- modules
- structs
- macros
- compiled files
Check the links (1) and (2) in the video description for the complete documentation of the Workspace Symbols query language.