0

I'm beginning to use vscode for python development. I'm a novice programmer in general, so I'm not sure what is the standard way of describing what I want: is a way , that things like pycharms provide, to check the source code of say, a class or a function, with one keyboard shortcut.

I've tried installing the Class IO extension, but doesn't seem to work.. I've tried the below keyboard shortcut specificationo in keybindings.json.

[{
"key": "shift+alt+g",
"command": "classio.goToParent",
"when": "editorLangId == 'python'"
},

2 Answers 2

2

I think that what you want is the "Go to definition" functionality

If a language supports it, you can go to the definition of a symbol by pressing F12.

If you press Ctrl and hover over a symbol, a preview of the declaration will appear

Tip: You can jump to the definition with Ctrl+Click or open the definition to the side with Ctrl+Alt+Click.

Sign up to request clarification or add additional context in comments.

Comments

0

I think that you can consult the VS Code Keyboard Shortcuts (Windows) sheet at:

https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf

If you want to check the class definition (where you declared the class) your shortcut is F12. I hope this sheet can be useful enough for you to get started in VS Code.

Linux: https://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdf

MacOS: https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.