如何在 sublime text 2 中创建自定义布局? [英] how to create a custom layout in sublime text 2?

查看:43
本文介绍了如何在 sublime text 2 中创建自定义布局?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个 2 列布局,其中第 2 列被分成 2 行,但我并没有真正想知道如何做到这一点.我知道这个布局被添加到 Main.sublime-menu 中,所以我复制了其中一个布局并将其命名为 Custom 1,但不确定我必须添加什么作为键/值对或数组.有人能帮我解决这个问题吗?

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?

这是我目前使用的:

{
                        "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]]
                        }
                    }

推荐答案

试试这个:

{
    "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]
        ]
    }
}

参考:

这篇关于如何在 sublime text 2 中创建自定义布局?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆