Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to open a file in two split windows?

I split the editor

and I want to show the file in the both sides of the editor,

most probably this is too easy but I can't find how to do that,

edit: I find a way, I close all other files, and keep only the target file, and then I split the editor. now phpstorm will show the file in both windows. and then I reopen other files. but I don't think this is smart. Probably there is a better way.

thank you

enter image description here

like image 443
Aladdin Mhemed Avatar asked Dec 05 '14 13:12

Aladdin Mhemed


People also ask

How do I open two windows of the same file?

To do this, (with your document open) go to Window > Arrange > New Window for [file name of your document], which will open up a second window for the original document. Then go to Window > Arrange > 2-Up Vertical to place the two windows side-by-side.

How do I toggle between split screens?

You can move them one by one by windows+alt+arrow keys to the direction you want but it has to be done one by one to the window that has been selected. To bring a windows to right side that is on the left activate it and then press win+right key twice.


1 Answers

In general: to split current tab in editor:

  • Right click on editor tab
  • choose Split Horizontally or Split Vertically
  • you can also use Move Down or Move Right -- but this will move editor tab into new split instead of "copying" it.

Let's assume you have this setup (notice "test.php" is already located in both splits): enter image description here

Now you want to have "css.css" to be in both splits as well. Depends on your IDE version you will have 2 choices:

1) Split this file -- you will have 3 splits now: enter image description here

Using mouse move "css.css" from newly created split into existing split: enter image description here

2) Use Open in Opposite Group action
enter image description here

like image 130
LazyOne Avatar answered Sep 25 '22 23:09

LazyOne