Custom layouts, Sublime text 2

后端 未结 2 1055
故里飘歌
故里飘歌 2021-01-30 18:20

I\'ve been working with a 2 column system so far but feel I\'m needing a third and that 3 spread across the screen doesn\'t give much of a view without adjusting the width every

相关标签:
2条回答
  • 2021-01-30 18:41

    This was very helpful for visualizing what points the coordinates are referring to: http://www.sublimetext.com/forum/viewtopic.php?f=6&t=7284&start=0&hilit=set+layout

    0 讨论(0)
  • 2021-01-30 18:42

    Assuming these are just coordinates with 0,0 at the upper left, something like this should work:

    [0, 0, 1, 1],
    [1, 0, 2, 1],
    [0, 1, 2, 2]
    


    Edit: Just tested, and it does.

    Create the file Main.sublime-menu in your Packages > User folder (best to leave the default menu alone) and put the following code in it:

    [{
        "id": "view",
        "children": [{
            "id": "layout",
            "children": [{
                 "command": "set_layout",
                 "caption" : "Custom: 3 Pane",
                 "mnemonic": "C",
                 "args": {
                    "cols": [0.0, 0.5, 1.0],
                    "rows": [0.0, 0.5, 1.0],
                    "cells": [
                        [0, 0, 1, 1],
                        [1, 0, 2, 1],
                        [0, 1, 2, 2]
                    ]
                }
            }]
        }]
    }]
    

    You will see Custom: 3 Pane in your layout options. No need to restart Sublime Text.

    For anyone interested, here is a gist containing this layout as well as a flipped version.

    0 讨论(0)
提交回复
热议问题