Since there doesn't seem to be any documentation on the set_layout API, I'm trying to figure out the limitations of this function.
It seems the "cells" parameter of set_layout is a list of lists where each individual list contains an x1, y1, x2, y2 where each value must be an integer. However, there are additional constraints on the cells because layouts must be grid-like. That is, the following layout is impossible:
| | |
| | |
| | | |
| | | |
Because the top row's cells do not align with the bottom row's cells.
Am I correct this is a current limitation? And if it is, are there any plans to address this?
Thanks for any feedback!
@castles_made_of_sand! @castles_made_of_sand! @castles_made_of_sand! (if you say his name three times, he'll show up and answer your question.)
Oh you can't trick me, I saw Beetlejuice!
In all seriousness, if someone has an answer to this, it would be castles_made_of_sand; he spent a lot of time with layouts.
Hopefully he see's this thread then! I'm hoping to develop a window splitting plugin, similar to vim's vsplit and split functionality, but if what I've found is true then it seems it might be impossible .
It works just fine.
"cols": [0.0, 0.33, 0.5, 0.66, 1.0],
"rows": [0.0, 0.5, 1.0],
[0, 0, 2, 1], [2, 0, 4, 1],
[0, 1, 1, 2], [1, 1, 3, 2], [3, 1, 4, 2]]
I do not understand why the cols parameter works. Doesn't the 4 intervals (0.0-0.33, 0.33-0.5, 0.5-0.66, 0.66-1.0) designate 4 columns, but there are only 3? Maybe I am misunderstanding what cols and rows really represent.
cells can span multiple columns
If you wanna find the full 5 cols and make sense of it, just count all vertical lines you can see in the layout, including the outer edges, 0 and 1
As for limitations, splitting isn't a problem but closing cells (merging with adjacent ones) is.
It's hard to control where the views end up as the only way to identify groups is via their position in the cells array.
There's workarounds ... I'm pretty busy/exhausted atm else I'd go into detail.
Ah, that makes sense. Thank you for the explanation.
Is there someway to discover undocumented APIs? I realize there is the Default/ directory but that certainly isn't extensive.
The first place you wanna go is here: sublimetext.com/docs/2/api_reference.html
Sometimes it doesn't have em all listed.
Can be useful for discovering unlisted apis, though once discovered you still have to poke/prod if you can't find docs for em.
No, but as you delve deeper into uncharted territory, please consider documenting it and posting it on either the "Unofficial Docs" or the brand new "Knowledge Base". Thanks!
Unofficial Docs: docs.sublimetext.info/ (github repo: github.com/SublimeText/UnofficialDocs)
Knowledge Base: kb.sublimetext.info/ (github repo: github.com/SublimeText/KnowledgeBase)
Thank god you stuck in the  and  else I wouldn't have been sure what you were talking about!
Unofficial Docs .... FFFFFFFFFFFF .... what does he mean?????
Makes it look more professional
Just like my awesome vocabulary (see Exhibit A for examples of my enhanced vocabulary.)
Did you mean the "Unofficial Docs" or the "Unofficial Docs" ?
 [docs.sublimetext.info/en/latest/ ... xdefs.html](http://docs.sublimetext.info/en/latest/extensibility/syntaxdefs.html)
 [sublimetext.info/docs/en/extensi ... xdefs.html](http://sublimetext.info/docs/en/extensibility/syntaxdefs.html)
oooh! what's the prize? a 512GB SSD ? yes pweaze
Your prize...I made you this sweater out of my tears. The tears of a failure...
hahaha ... I got nothing ... couldn't find a good respon(s|g)e bob ...