Say I'm reading file xyz.py, and as function func_x, which is on line x, calls class_y, which is on line y, I want to see both func_x and class_y at the same time so that I don't have to keep on scrolling up and down to read func_x and class_y. How would I open file xyz.py side by side so that I can read both func_x and class_y at the same time?
Edit: This isn't this, as it doesn't explain how to have the same window side by side.
First, you can click on the divider bar at the top of the scroll bar on the right side of your editor window. Dragging that bar down divides your code window into two panes (one on top of the other), which you can scroll through independently.
You can simply do File>New Window and open the other project in the new window. Because after you close VSCODE and launch it again it opens only one of these two windows. But with workspace you keep both.
In the top right of your screen there should be a split editor button that looks like this:
That should do the trick.
The default keyboard shortcut (on windows) is Ctrl+\
(Ctrl or ⌘+Shift+P)
Type split e
Enter
(Select View: Split Editor)
Alt+Left-click the file
Click the Split Editor button () in the upper right corner.
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