How to show uses of function in Visual Studio Code?

I am used from Pycharm to be able to press ctrl + click on a function definition and see the uses. Is there an equivalent in VSC?


you can use shift+f12 for get better view of usage

https://github.com/Microsoft/vscode-tips-and-tricks

read this and you can get better idea


There is, but VSCode doesn't support key bindings with mouse buttons. The relevant issue is #3130. That means that it will not work the same way as it works in PyCharm.

What You can do though is to use - I believe - ShiftF12 or set some key combination to show all usages of function.

To do this You can press CtrlK, then CtrlS and click on 'keybinding.json' link in the sentence: "For advanced customization open and edit keybinding.json".
After getting keybinding.json open, add the following entry there.

{
    "key": "ctrl+shift+d",
    "command": "editor.action.referenceSearch.trigger",
    "when": "editorHasReferenceProvider && editorTextFocus && !inReferenceSearchEditor"
}

It should let You show usages of function by pressing CtrlShiftD. Obviously, You can customize it however You like.

I also recommend adding the following entry to close the dialog with the same key combination.

{
    "key": "ctrl+shift+d",
    "command": "closeReferenceSearch",
    "when": "referenceSearchVisible && !config.editor.stablePeek"
}

2020-03-05 update

You can CTRL+CLICK (Windows) or CMD+CLICK (Mac) on the function name and look on the right column.


Right-click and select "Go to References" or "Find All References" from context menu:

enter image description here