Sublime Forum

Specify a column/row file layout when opening subllime

#1

Hi I am wondering if there is a way to specify sublime to open a window with a specific split layout ( rows and columns) from the cli.
All the files are generated dynamically by a script and wish to open sublime from that script with the desired layout
Something like:
files A, B, C on the first row ( 3 columns )
file D on the second row ( 1 column )

Regards

0 Likes

#2

You can pass a command yo subl on the command line to run after the files are open, but without a custom command you can not assign each file to a specific pane

subl -n --command 'set_layout {"cells": [0, 0, 1, 1], [0, 1, 2, 2], [1, 0, 2, 1]], "cols": [0.0, 0.75, 1.0], "rows": [0.0, 0.75, 1.0]}' file_a file_b file_c

the command above opens a new sublime window and set in 3 pane layout (one on left, one on right and one on bottom) and open files in sublime but since things are happening async you do not control which file appear where.

0 Likes