Sublime Forum

Opening files in the different tabs of the layout


I saw that window.set_layout() can be used to change the layout, but I do not know how to open files in them. What I want to do is that I want to create a code area, input and output layout area. So lets say on a key press, the layout changes and the files get opened there.

Something like this:

What I also want is that the output tab should automatically change when it gets updated even when that tab isn’t active.

I am very new to building plugins and It would be great if someone could help me with the relevant function, examples and how to use them appropriately.



Have you tried the Origami package ? It gives the user a whole bunch of useful shortcuts to create layouts, carry files across panes as well as save custom layouts for later use I believe.