how to create a custom layout in sublime text 2?
javascript, sublimetext2
Solution
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:
- https://gist.github.com/1320281
Problem
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]] } } ```