Babar-Baig
Babar-Baig

Reputation: 779

In PyCharm, how to open two files side by side

In PyCharm, I know that you can use the 'split pane' option to open one file in two panes.
But how do you concurrently open two files side by side? E.g. stack.py and test_stack.py?

Upvotes: 7

Views: 8327

Answers (3)

Snostorp
Snostorp

Reputation: 842

In PyCharm 2023:

  1. Right-click on the tab you want to move to the other pane (e.g. test_stack.py).
  2. Choose "Split and Move Right" from the popup menu.

Split and Move Right

Upvotes: 1

Babar-Baig
Babar-Baig

Reputation: 779

In PyCharm:

  1. Open two files, say stack.py, and test_stack.py. They will open in two tabs.
  2. Let's say we want to open test_stack.py in the right pane. Right-click on the test_stack.py tab, and choose "Split and Move Right".

Upvotes: 4

darcamo
darcamo

Reputation: 3493

First, use split panel. After that, you can move any open files from one panel to the other by dragging and/or you can put the cursor in one panel and open a file as usual. The file will be opened in that panel.

If you split using either "split vertically" or "split horizontally" the file will be in both panels (you can close one of them) but there is also "split and move down" and "split and move right" actions.

Good shortcuts to know for this is Ctrl+Shift+A for actions (then write "split" and choose what you want) and Ctrl+Shift+N for easily opening files.

Upvotes: 6

Related Questions