Visual Studio Code version 1.27.2
Find all References
only list references in the current file
.
I need to find all references across files in a project.
Is it possible ?
Something like find usages
If you right click a symbol
and select "find usages". If the current symbol is a function
, then "find usages" searches for all places where this function is called. If the current symbol is a variable
, then "find usages" searches for all places where this variable is used etc etc.
Advanced features such as
Find all references
are implemented by each language extension.For JavaScript, try creating a
jsconfig.json
at the root of your workspace with the contents:This file tells VS Code to treat all JS files in your workspace as part of the same javascript project.
Find all references
still may not work properly in JavaScript if your code is too dynamic. It works best against modern js that usesimport
/export
,class
, and friendsIn Visual Studio Code you can do this by first highlighting the text you want to search for, then using the command: CTRL + SHIFT + F (pressing all at once).
CTRL + SHIFT + F is just a shortcut for accessing the search tab on the left-hand side of VSCode. Hope that helps and apologies for the scribbles :)
Please try this: https://marketplace.visualstudio.com/items?itemName=zhengx666.find-usages
Not the same as webstorm but still does the trick pretty much.