Opening same file in multiple splits

I just recently was introduced to webstorm and am trying to get up and running with it as my primary editor. So far I am really enjoying the automation it provides but I can't quite get all the code up that I need.

One thing I find missing for my normal workflow though is that I like to open the same file multiple times so I can be referencing other parts of the file while editing code.  With my previous editor I would have two windows open (one per monitor) and then have a splitter in each window so I would be able to view 4 files simultaneously.  That editor provides the same list of files for each of the four splits, so I could select to open any file in any split at any time.

I am having trouble replicating this with WebStorm.  When I have one window open and I open a horizontal split so I can see two files at the same time, I can't find a way to get the same tab (file) in both splits.  Is there something I am missing that would allow this?

Simiarly is there a way to open another window with two more splits and have all my files also available there?

Thanks.

2 comments

Hi there,

When I have one window open and I open a horizontal split so I can see two files at the same time, I can't find a way to get the same tab (file) in both splits.  Is there something I am missing that would allow this?

When you use "Split Vertically/Horizontally" on currently active Editor tab, that particular file will be available in both splitters (current and new one). By repeating this operation, you can have the same file opened in multiple splitters.

You cannot use "Split Vertically/Horizontally" and have ALL tabs duplicated in another split in one go -- it works on currently active tab only.

You have to split each file manually (by using "Split Vertically/Horizontally"  .. or press and hold Ctrl when mouse dragging editor tab into another split/window)

Simiarly is there a way to open another window with two more splits and have all my files also available there?

To open another window just drag some tab into area outside of current Editor window (e.g. task tab; menu bar; outside of IDE window). This will open new Editor window with that tab. You can continue splitting there.

1

Thanks.  That was exactly what I needed.  I didn't know about the Ctrl + drag option.  One note, atleast for me when I slick + drag a tab, it leaves the tab in the first split like I expect, but it doesn't leave that tab selected.  This seems like a bug.

0

Please sign in to leave a comment.