简体   繁体   中英

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? Eg stack.py and test_stack.py?

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.

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".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM