I would like to create a 2 column layout where column 2 is split into 2 rows but havent really had any joy trying to find out how this can be done. I know that this layout gets added to Main.sublime-menu so I duplicated one of the layouts and called it Custom 1, not sure what I have to add in as the key/value pairs or array though. Could anyone possibly help me with this?
here is what im working with so far:
{
"caption": "Custom 1",
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells": [[0, 0, 1, 1], [0, 1, 1, 2], [0, 2, 1, 3]]
}
}
Try this:
{
"caption" : "Custom 1",
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells":
[
[0, 0, 1, 2], [1, 0, 2, 1],
[1, 1, 2, 2]
]
}
}
Reference:
This structure helps you to make yourself any design in Sublime Text.
0.0 0.5 1.0
+-------------------------------+-----------------------------+
0,0 1,0 2,0
0.0 +-------------------------------+-----------------------------+
| | | |
| | | |
| | | |
| | | |
| | | |
| 0,1 1,1 2,1
0.33 | +-----------------------------+
| | | |
| | | |
| | | |
| | | |
| | | |
| 0,2 1,2 2,2
0.66 | +-----------------------------+
| | | |
| | | |
| | | |
| | | |
| | | |
| 0,3 1,3 2,3
1.0 +-------------------------------+-----------------------------+
http://asciiflow.com/#0B0pB9AbvJ9zLcHFZYnp2YTZjNU0
Sublime View: (2 column, 1 column split into 3 row)
Your keymap Setting (Preferences -> Key Binding User -> Add inside brackets)
{ "keys": ["alt+shift+7"],
"caption": "2 cols (full - 3)",
"command": "set_layout",
"args":
{ "cols": [0.0, 0.5, 1.0],
"rows": [0.0, 0.33, 0.66, 1.0],
"cells": [ [0, 0, 1, 3], [1, 0, 2, 1], [1, 1, 2, 2], [1, 2, 2, 3] ]
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With