Find usages (find all file references / find all folder references)
See original GitHub issueIf you search the issues here on GitHub and on StackOverflow, you’ll find that there is a ton of fragmentation around this feature for a few reasons:
- Everyone is referring to different subsets of the feature
- Everyone is calling it by different names (users coming from WebStorm will refer to it as “Find Usages”)
- VSCode actually already has this partially implemented, but it’s hidden and not documented well.
This feature refers to three subsets of finding references:
1. Find all references of a symbol
VSCode has this already.
2. Find all references of a file
VSCode has this already, but few know about it, and the process for getting to it is unnecessary. Currently you need to use the “find all references” command on an import path that includes the file.
This is a very useful feature, and should be made available in the file explorer, for a file’s context menu when right clicking it, as explained here. Additionally, there should be a command, References: Find All References of File
as explained here.
3. Find all references of a folder
VSCode does not yet have this feature. When using this on a folder (made available in the context menu), it should show the references for all files inside that folder. A command might be useful here as well (References: Find All References of Folder
).
Note:
I’ve already submitted a feature request mentioning this in the past, which was closed and suggested as an extension. However, it looks like I wasn’t clear on what my request was, because VSCode has since implemented a lot of this functionality. And it’s also clear that there’s a lot of confusion around this among VSCode users.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:45
- Comments:17 (4 by maintainers)
Top GitHub Comments
This is the single biggest disappointment coming from WebStorm. VSCode wins in so many ways. The two areas that cause weekly pain are:
Finally in the backlog, which will take like 2 years or more. But at least there’s a milestone.
I can’t believe people can keep using VSCode without a proper “find usages”. It is the only reason I still stick with Sublime Text. For me as a PHP developer, there’s no way you can deal with non-namespace, autoloaded methods and functions without find usages.