How to show the use of a function in Visual Studio code?

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

+5
source share
2 answers

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

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

read this and you can get a better idea

+5
source

Exists, but VSCode does not support key bindings using mouse buttons. This means that it will not work the same as in PyCharm.

What you can do though is to use - I believe - Shift F12 or set some key combination to show all the usage features.

To do this, you can press Ctrl K , then Ctrl S and click on the link "keybinding.json" in the sentence: "For advanced settings, open and edit keybinding.json".
With keybinding.json , add the following entry there.

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

It should allow you to show the use of the function by pressing Ctrl Shift D. Obviously, you can customize it as 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" } 
+3
source

Source: https://habr.com/ru/post/1262851/


All Articles