I'm considerably new to Visual Studio Code and I am struggling a bit with an easy functionality. Imagine the case when I am reviewing some code in a file a.py and I select 'Go to definition' on a function x of the same file. Is there any possible configuration or shortcut that opens the definition on a split on the editor?
I have tried having already the same file split in the editor an it still opens the definition in the same file what is uncomfortable when you have to trace some code because you need to scroll up and down whenever you want to see another function of the same file.
An extension that allows to do the trick will also be well received. Thanks.
The shortcut is Ctrl+K, F12 but this can be changed in the shortcuts (search for shortcut editor.action.revealDefinitionAside) More details here https://github.com/microsoft/vscode/issues/112136
There are 2 ways to achieve this.
Either:
Or:
Editor > Goto Location: Multiple
to be gotoAndPeek
or goto
Both methods will open the definition in the split to the right (or create a new split if this is the right-most split).
You like?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With