Skip to content

Context menu 'Find all references' on files from file explorer. #66150

@Dzenly

Description

@Dzenly

There was an issue, but its status is unclear.

#6625
I am surprised why there are so little likes %)

Cases:

  • Node.js/JavaScript - all places where the current file is required by require.
    BTW: if I use "Find all references" on `require('./some-file.js') - VS Code does show me them. So the ability itself is already supported but there is no interface in file explorer.

  • Node.js/TypeScript - all places where the current file is imported.

  • C++ - all places where the file is included.

  • Which HTML uses the current JS file.

  • Etc.

For many years I used WebStorm which supports this. But in VS Code I have no idea how to find the place where some file is used but global searching it by some regexp. I was looking for some plugins and workarounds for 2 hours and found nothing %).

I tried to bind shortcut:

  {
    "key": "f12",
    "command": "references-view.find",
    "when": "filesExplorerFocus"
  }

but it runs last references search and not search for current file.

There is a question on SO, but no answer:
https://stackoverflow.com/questions/53267307/how-to-find-all-references-of-a-selected-module-in-vs-code

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code InsidersjavascriptJavaScript support issueson-testplanupstream-issue-linkedThis is an upstream issue that has been reported upstream

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions